New SQL Install already has me locked out for root - mysql

I am going a bit bonkers over this but this is what is happening.
I am installing mysql and mysql server but running the mysql_secure_installation and it already has me locked out of root.
Here's the full deal of what I went through. I have no idea what the password default may be but everyone keeps saying try "root" or just pressing enter (no password at all). How on earth am I locked out from the get go?
[root#Gretchen ~]# dnf install mysql mysql-server
Last metadata expiration check performed 1:52:35 ago on Tue Jan 5 10:07:03 2016.
Dependencies resolved.
=============================================================================================================================================================================================================================================
Package Arch Version Repository Size
=============================================================================================================================================================================================================================================
Installing:
mecab x86_64 0.996-1.fc23.3 fedora 393 k
mecab-ipadic x86_64 2.7.0.20070801-11.fc23.1 fedora 11 M
mysql-community-client x86_64 5.7.10-1.fc23 mysql57-community 25 M
mysql-community-common x86_64 5.7.10-1.fc23 mysql57-community 274 k
mysql-community-libs x86_64 5.7.10-1.fc23 mysql57-community 2.2 M
mysql-community-server x86_64 5.7.10-1.fc23 mysql57-community 105 M
Transaction Summary
=============================================================================================================================================================================================================================================
Install 6 Packages
Total download size: 143 M
Installed size: 670 M
Is this ok [y/N]: y
Downloading Packages:
(1/6): mysql-community-common-5.7.10-1.fc23.x86_64.rpm 629 kB/s | 274 kB 00:00
(2/6): mysql-community-libs-5.7.10-1.fc23.x86_64.rpm 609 kB/s | 2.2 MB 00:03
(3/6): mecab-0.996-1.fc23.3.x86_64.rpm 588 kB/s | 393 kB 00:00
(4/6): mecab-ipadic-2.7.0.20070801-11.fc23.1.x86_64.rpm 662 kB/s | 11 MB 00:16
(5/6): mysql-community-client-5.7.10-1.fc23.x86_64.rpm 1.0 MB/s | 25 MB 00:23
(6/6): mysql-community-server-5.7.10-1.fc23.x86_64.rpm 1.9 MB/s | 105 MB 00:55
---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
Total 2.5 MB/s | 143 MB 00:56
Running transaction check
Transaction check succeeded.
Running transaction test
Transaction test succeeded.
Running transaction
Installing : mecab-0.996-1.fc23.3.x86_64 1/6
Installing : mysql-community-common-5.7.10-1.fc23.x86_64 2/6
Installing : mysql-community-libs-5.7.10-1.fc23.x86_64 3/6
Installing : mysql-community-client-5.7.10-1.fc23.x86_64 4/6
Installing : mecab-ipadic-2.7.0.20070801-11.fc23.1.x86_64 5/6
Installing : mysql-community-server-5.7.10-1.fc23.x86_64 6/6
Verifying : mysql-community-client-5.7.10-1.fc23.x86_64 1/6
Verifying : mysql-community-libs-5.7.10-1.fc23.x86_64 2/6
Verifying : mysql-community-common-5.7.10-1.fc23.x86_64 3/6
Verifying : mysql-community-server-5.7.10-1.fc23.x86_64 4/6
Verifying : mecab-0.996-1.fc23.3.x86_64 5/6
Verifying : mecab-ipadic-2.7.0.20070801-11.fc23.1.x86_64 6/6
Installed:
mecab.x86_64 0.996-1.fc23.3 mecab-ipadic.x86_64 2.7.0.20070801-11.fc23.1 mysql-community-client.x86_64 5.7.10-1.fc23 mysql-community-common.x86_64 5.7.10-1.fc23 mysql-community-libs.x86_64 5.7.10-1.fc23
mysql-community-server.x86_64 5.7.10-1.fc23
Complete!
[root#Gretchen ~]#
[root#Gretchen ~]# service mysqld start
Redirecting to /bin/systemctl start mysqld.service
[root#Gretchen ~]#
[root#Gretchen ~]#
[root#Gretchen ~]# cd /usr/bin
[root#Gretchen bin]# mysql_secure_installation
Securing the MySQL server deployment.
Enter password for user root:
Error: Access denied for user 'root'#'localhost' (using password: NO)
[root#Gretchen bin]# mysql_secure_installation
Securing the MySQL server deployment.
Enter password for user root:
Error: Access denied for user 'root'#'localhost' (using password: YES)
[root#Gretchen bin]#
of course if I uninstall and re-install this continues to happen. I'm afraid I may have installed something else that I should be uninstalling also but I'm unsure.
I have no interest in keeping any databases or users or anything. I just want to have SQL starting from scratch without having to redo my entire server.

Typically mysql stores your initial root password would be stored in /root/.mysql_secret. Check it out.

You may have to start the service with:
service mysql start
Then try mysql_secure_installation again.

Related

How do I specify a repo for yum install in aws beanstalk file install_packages.config?

I need to install sshpass on my AWS beanstalk when it is deployed.
I created a new clone to check that I could do it from the ssh shell command line and found that unless I specified the epel repo, it would not find the package:
$ sudo yum -y install sshpass
Failed to set locale, defaulting to C
Loaded plugins: priorities, update-motd, upgrade-helper
amzn-main | 2.1 kB 00:00:00
amzn-updates | 2.5 kB 00:00:00
No package sshpass available.
Error: Nothing to do
but this works:
$ sudo yum --enablerepo=epel -y install sshpass
Failed to set locale, defaulting to C
Loaded plugins: priorities, update-motd, upgrade-helper
1070 packages excluded due to repository priority protections
Resolving Dependencies
--> Running transaction check
---> Package sshpass.x86_64 0:1.06-1.el6 will be installed
--> Finished Dependency Resolution
Dependencies Resolved
==================================================================================================================================================================
Package Arch Version Repository Size
==================================================================================================================================================================
Installing:
sshpass x86_64 1.06-1.el6 epel 20 k
Transaction Summary
==================================================================================================================================================================
Install 1 Package
Total download size: 20 k
Installed size: 34 k
Downloading packages:
sshpass-1.06-1.el6.x86_64.rpm | 20 kB 00:00:00
Running transaction check
Running transaction test
Transaction test succeeded
Running transaction
Installing : sshpass-1.06-1.el6.x86_64 1/1
Verifying : sshpass-1.06-1.el6.x86_64 1/1
Installed:
sshpass.x86_64 0:1.06-1.el6
Complete!
So how would I do this in the .ebextensions/-1-packages/install-packages.config file?
The syntax is defined in the AWS example as follows:
packages:
yum:
libmemcached: []
ruby-devel: []
gcc: []
rpm:
epel: http://download.fedoraproject.org/pub/epel/5/i386/epel-release-5-4.noarch.rpm
rubygems:
chef: '0.10.2'
But I'm not sure how to implement that for my case where i just want to tell it to use the epel repo
packages:
yum:
...
...
sshpass: []
I'm guessing the above won't automatically cause it to use the epel repo?
There might be a better way, but this worked:
commands:
24-sshpass:
command: "yum --enablerepo=epel -y install sshpass"

libncurses.so.5 - cannot open shared library, Fedora

I am getting this error when I try to run a 64-bit program on a new 64-bit Fedora 28 installation.
I have tried to install the ncurses library these ways:
sudo yum install ncurses-libs
sudo dnf install ncurses-devel
yum provides libncurses.so.5
There is no file called libncurses.so.5 anywhere on the filesystem. There is a file in /usr/lib64 call libncurses.so.6 and I tried renaming this to 5 but then it says libtinfo.so.5 is missing.
I get this:
[username#localhost project]$ ./main ./demo.conf
./main: error while loading shared libraries: libncurses.so.5: cannot open shared object file: No such file or directory
These are my commands and their output:
[username#localhost ~]$ sudo yum install ncurses-devel
[sudo] password for username:
Fedora 28 - x86_64 371 kB/s | 60 MB 02:46
Last metadata expiration check: 0:01:24 ago on Sat 04 Aug 2018 09:34:19 PM PDT.
Dependencies resolved.
================================================================================
Package Arch Version Repository Size
================================================================================
Installing:
ncurses-devel x86_64 6.1-5.20180224.fc28 updates 527 k
Upgrading:
ncurses x86_64 6.1-5.20180224.fc28 updates 377 k
ncurses-base noarch 6.1-5.20180224.fc28 updates 80 k
ncurses-libs x86_64 6.1-5.20180224.fc28 updates 307 k
Installing dependencies:
ncurses-c++-libs x86_64 6.1-5.20180224.fc28 updates 54 k
Transaction Summary
================================================================================
Install 2 Packages
Upgrade 3 Packages
Total download size: 1.3 M
Is this ok [y/N]: y
Downloading Packages:
(1/5): ncurses-c++-libs-6.1-5.20180224.fc28.x86 51 kB/s | 54 kB 00:01
(2/5): ncurses-base-6.1-5.20180224.fc28.noarch. 65 kB/s | 80 kB 00:01
(3/5): ncurses-libs-6.1-5.20180224.fc28.x86_64. 127 kB/s | 307 kB 00:02
(4/5): ncurses-devel-6.1-5.20180224.fc28.x86_64 152 kB/s | 527 kB 00:03
(5/5): ncurses-6.1-5.20180224.fc28.x86_64.rpm 234 kB/s | 377 kB 00:01
--------------------------------------------------------------------------------
Total 296 kB/s | 1.3 MB 00:04
Running transaction check
Transaction check succeeded.
Running transaction test
Transaction test succeeded.
Running transaction
Preparing : 1/1
Upgrading : ncurses-base-6.1-5.20180224.fc28.noarch 1/8
Upgrading : ncurses-libs-6.1-5.20180224.fc28.x86_64 2/8
Installing : ncurses-c++-libs-6.1-5.20180224.fc28.x86_64 3/8
Installing : ncurses-devel-6.1-5.20180224.fc28.x86_64 4/8
Upgrading : ncurses-6.1-5.20180224.fc28.x86_64 5/8
Cleanup : ncurses-6.1-4.20180224.fc28.x86_64 6/8
Cleanup : ncurses-libs-6.1-4.20180224.fc28.x86_64 7/8
Cleanup : ncurses-base-6.1-4.20180224.fc28.noarch 8/8
Running scriptlet: ncurses-base-6.1-4.20180224.fc28.noarch 8/8
Verifying : ncurses-devel-6.1-5.20180224.fc28.x86_64 1/8
Verifying : ncurses-c++-libs-6.1-5.20180224.fc28.x86_64 2/8
Verifying : ncurses-libs-6.1-5.20180224.fc28.x86_64 3/8
Verifying : ncurses-base-6.1-5.20180224.fc28.noarch 4/8
Verifying : ncurses-6.1-5.20180224.fc28.x86_64 5/8
Verifying : ncurses-6.1-4.20180224.fc28.x86_64 6/8
Verifying : ncurses-base-6.1-4.20180224.fc28.noarch 7/8
Verifying : ncurses-libs-6.1-4.20180224.fc28.x86_64 8/8
Installed:
ncurses-devel.x86_64 6.1-5.20180224.fc28
ncurses-c++-libs.x86_64 6.1-5.20180224.fc28
Upgraded:
ncurses.x86_64 6.1-5.20180224.fc28
ncurses-base.noarch 6.1-5.20180224.fc28
ncurses-libs.x86_64 6.1-5.20180224.fc28
Complete!
[username#localhost project]$ sudo yum install ncurses-libs
Last metadata expiration check: 0:05:45 ago on Sat 04 Aug 2018 09:34:19 PM PDT.
Package ncurses-libs-6.1-5.20180224.fc28.x86_64 is already installed, skipping.
Dependencies resolved.
Nothing to do.
Complete!
[username#localhost project]$ yum provides libncurses.so.5
Fedora 28 - x86_64 3.1 MB/s | 60 MB 00:19
Last metadata expiration check: 0:00:28 ago on Sat 04 Aug 2018 09:48:51 PM PDT.
ncurses-compat-libs-6.1-5.20180224.fc28.i686 : Ncurses compatibility libraries
Repo : updates
Matched from:
Provide : libncurses.so.5
ncurses-compat-libs-6.1-4.20180224.fc28.i686 : Ncurses compatibility libraries
Repo : fedora
Matched from:
Provide : libncurses.so.5
Try to install ncurses-compat-libs.
You would first use
dnf provides */libncurses.so.5
which can help you find a package that provides the file, and then install the respective package,
dnf install ncurses-compat-libs
in this case.
Just try to install the libncurses5 library:
apt install libncurses5
For more information, see this Reddit post.
I was able to solve this bug by installing that package.
For centos 8, encountered during couchbase install
dnf search libncurses
You will see list of packages with libcurses, you no need to download and install rpm package from official repo, just install from comand line only
sudo yum install ncurses-compat-libs

Permission denied # rb_sysopen - /tmp/github_api_headers20180618-21004-yrr75i error.

I am attempting to install mysql using homebrew but I keep getting
Permission denied # rb_sysopen - /tmp/github_api_headers20180618-21004-yrr75i
This is my brew config
HOMEBREW_VERSION: 1.6.9
ORIGIN: https://github.com/Homebrew/brew
HEAD: c814199a791867ab75f90a22715e2475706b13d8
Last commit: 7 hours ago
Core tap ORIGIN: https://github.com/Homebrew/homebrew-core
Core tap HEAD: c58fde35d617490bad4de8faeaa9e9f1c81341ea
Core tap last commit: 6 hours ago
HOMEBREW_PREFIX: /usr/local
HOMEBREW_NO_ANALYTICS_THIS_RUN: 1
CPU: quad-core 64-bit broadwell
Homebrew Ruby: 2.3.3 => /System/Library/Frameworks/Ruby.framework/Versions/2.3/usr/bin/ruby
Clang: 9.1 build 902
Git: 2.15.2 => /Library/Developer/CommandLineTools/usr/bin/git
Curl: 7.54.0 => /usr/bin/curl
Java: 1.8.0_144, 1.8.0_111
macOS: 10.13.5-x86_64
CLT: 9.4.1.0.1.1528165917
Xcode: 9.4.1
XQuartz: N/A
OS information
MacOS High Sierra
version 10.13.5
I tried to chown my tmp file but I realize that the permission are fine.
drwxr-xr-x 11 _mysql _mysql 352 Jun 18 15:42 tmp
How do I correct this issue?

rpm: /usr/bin/rpmsign: Permiso denegado

Hello need help with this error:
[root#localhost ~]# rpm --addsign php-composer-ca-bundle-1.0.2-1.fc22.remi.noarc
rpm: /usr/bin/rpmsign: No existe el fichero o el directorio
[root#localhost ~]# mkdir /usr/bin/rpmsign
rpm: /usr/bin/rpmsign: Permiso denegado
System is Fedora 22
no internet conection to solve via yum install
You are getting an error message which says that the file /usr/bin/rpmsign doesn't exist:
rpm: /usr/bin/rpmsign: No existe el fichero o el directorio
(In English, that would be rpm: /usr/bin/rpmsign: No such file or directory.)
You respond to that by just creating the missing thing as a directory with mkdir:
[root#localhost ~]# mkdir /usr/bin/rpmsign
I guess that follows a certain logic, but the thing is, that can't be just any file. RPM is looking for the actual rpmsign executable. You get the error Permiso denegado (permission denied) when RPM tries to execute that directory. (I'm assuming there's a missing line in your question, where you try to run rpm --addsign again`.)
So, what you need to do is first rmdir /usr/bin/rpmsign, because the directory you created will get in the way of installing the actual RPM. It happens that this is provided by the rpm-sign package. You can find that by running dnf whatprovides /usr/bin/rpmsign — or, you can actually just straight-up tell DNF (or Yum; doesn't matter) to install it:
$ sudo dnf install /usr/bin/rpmsign
Last metadata expiration check: 2:45:11 ago on Wed May 4 08:23:32 2016.
Dependencies resolved.
================================================================================
Package Arch Version Repository Size
================================================================================
Installing:
rpm-sign x86_64 4.13.0-0.rc1.13.fc23 updates 55 k
Transaction Summary
================================================================================
Install 1 Package
Total download size: 55 k
Installed size: 17 k
Is this ok [y/N]: y
Downloading Packages:
rpm-sign-4.13.0-0.rc1.13.fc23.x86_64.rpm 140 kB/s | 55 kB 00:00
--------------------------------------------------------------------------------
Total 44 kB/s | 55 kB 00:01
Running transaction check
Transaction check succeeded.
Running transaction test
Transaction test succeeded.
Running transaction
Installing : rpm-sign-4.13.0-0.rc1.13.fc23.x86_64 1/1
Verifying : rpm-sign-4.13.0-0.rc1.13.fc23.x86_64 1/1
Installed:
rpm-sign.x86_64 4.13.0-0.rc1.13.fc23
Complete!

Can't install MySQL 5.6 by RPM

I'm trying to install MySQL 5.6 community edition from the RPM package I downloaded. I'm running on cloudera's CDH 4.5 virtual machine, which is CentOS 6.4. The VM came with MySQL 5.1.73 installed, the old versions of files seem to be blocking me from updating.
I already did this:
sudo yum remove mysql
and that worked just fine, without a problem. Then I deleted everything in /usr/lib/mysql, aka the data directory. So then I tried installing the new version:
[cloudera#localhost mysql]$ pwd
/home/cloudera/mysql
[cloudera#localhost mysql]$ ll
total 302660
-rw-r--r-- 1 cloudera cloudera 23080383 Mar 17 02:39 MySQL-client-5.6.17-1.linux_glibc2.5.x86_64.rpm
-rw-r--r-- 1 cloudera cloudera 4573735 Mar 17 02:40 MySQL-devel-5.6.17-1.linux_glibc2.5.x86_64.rpm
-rw-r--r-- 1 cloudera cloudera 114192347 Mar 17 02:40 MySQL-embedded-5.6.17-1.linux_glibc2.5.x86_64.rpm
-rw-r--r-- 1 cloudera cloudera 86961692 Mar 17 02:41 MySQL-server-5.6.17-1.linux_glibc2.5.x86_64.rpm
-rw-r--r-- 1 cloudera cloudera 2398671 Mar 17 02:41 MySQL-shared-5.6.17-1.linux_glibc2.5.x86_64.rpm
-rw-r--r-- 1 cloudera cloudera 5180653 Mar 17 02:41 MySQL-shared-compat-5.6.17-1.linux_glibc2.5.x86_64.rpm
-rw-r--r-- 1 cloudera cloudera 73530987 Mar 17 02:42 MySQL-test-5.6.17-1.linux_glibc2.5.x86_64.rpm
[cloudera#localhost mysql]$ sudo yum install MySQL-server-5.6.17-1.linux_glibc2.5.x86_64.rpm
.....
Downloading Packages:
Running rpm_check_debug
Running Transaction Test
Transaction Check Error:
file /usr/share/mysql/charsets/README from install of MySQL-server-5.6.17-1.linux_glibc2.5.x86_64 conflicts with file from package mysql-libs-5.1.73-3.el6_5.x86_64
file /usr/share/mysql/czech/errmsg.sys from install of MySQL-server-5.6.17-1.linux_glibc2.5.x86_64 conflicts with file from package mysql-libs-5.1.73-3.el6_5.x86_64
......
So it looks like the old installation is blocking me, I tried to delete mysql-libs but...
[cloudera#localhost mysql]$ sudo yum remove mysql-libs
.....
pig noarch 0.11.0+33-1.cdh4.4.0.p0.14.el6 #cloudera-cdh4 120 M
postfix x86_64 2:2.6.6-2.2.el6_1 #anaconda-CentOS-201112091719.x86_64/6.2 9.7 M
redhat-lsb x86_64 4.0-7.el6.centos #base 0.0
redhat-lsb-compat x86_64 4.0-7.el6.centos #base 0.0
redhat-lsb-core x86_64 4.0-7.el6.centos #base 22 k
redhat-lsb-graphics x86_64 4.0-7.el6.centos #base 0.0
redhat-lsb-printing x86_64 4.0-7.el6.centos #base 0.0
solr noarch 4.4.0+69-1.cdh4.3.0.p0.4.el6 #cloudera-search 66 M
solr-mapreduce noarch 1.0.0-1.cdh4.3.0.p0.5.el6 #cloudera-search 55 M
sqoop noarch 1.4.3+62-1.cdh4.4.0.p0.15.el6 #cloudera-cdh4 7.7 M
sqoop2 noarch 1.99.2+85-1.cdh4.4.0.p0.62.el6 #cloudera-cdh4 7.8 M
sysstat x86_64 9.0.4-20.el6 #base 807 k
tomcat noarch 7.0.33-3.el6 #epel 303 k
Transaction Summary
=============================================================================================================================================================================================
Remove 67 Package(s)
It went and listed a lot of major software that depends on mysql-libs. I don't want to reinstall tomcat, pig, hive, mahout, hue, oozie, flume, and cloudera manager. I have worked with those before, I know that they are a NIGHTMARE to get installed and configured correctly, so I really don't want to uninstall those.
So I thought maybe I should try an update instead,
[cloudera#localhost mysql]$ sudo yum update MySQL-server-5.6.17-1.linux_glibc2.5.x86_64.rpm
....
Examining MySQL-server-5.6.17-1.linux_glibc2.5.x86_64.rpm: MySQL-server-5.6.17-1.linux_glibc2.5.x86_64
Package MySQL-server not installed, cannot update it. Run yum install to install it instead.
No Packages marked for Update
It will not let me update it because I already removed it.
Would somebody please tell me how to install MySQL from these RPMs without uninstalling everything else?
Try to install shared-compat packages as you can see here.
I'm just going to re-write the answer for anybody else who comes across this.
Download the mysql yum repo if you don't already have it: http://dev.mysql.com/downloads/file.php?id=450542
If you have an old version of mysql installed, just do a yum update mysql. You may also need to do yum update mysql-server.
If you uninstalled it, try to reinstall now that you have the new yum repo. If it still fails due to a Transaction check error, try deleting any files that it lists in conflict. Be careful not to delete any files you want to keep.
you may also need to do 'sudo yum update mysql-server' or 'sudo yum install mysql-server'. I did.
I will mark acfrai's answer correct to give him credit, he helped lead me to this information.