Hello, I discovered today that CentOS 7 has replaced MySQL with MariaDB. Which is fine, it's seems really similar. And I was already aware that it was written by the original team that wrote mysql. It's cool that the mysql command still gets you in! This is the version I have: [root at web1:~] #mysql --version mysql Ver 15.1 Distrib 5.5.37-MariaDB, for Linux (x86_64) using readline 5.1 But for some reason all I have to do is type the word 'mysql' to get me into the database. That's ok for initial setup I guess. But once I was in a did away with all the accounts that either had blank set for the username, and updated all the accounts to use passwords. MariaDB [mysql]> select User,'@',Host,Password from user; +-------+---+-----------+-------------------------------------------+ | User | @ | Host | Password | +-------+---+-----------+-------------------------------------------+ | root | @ | localhost | *8328225AE4A663FAKEFAKEFAKEFAKEFAKE93D61 | | root | @ | web1 | *8328225AE4A663FAKEFAKEFAKEFAKEFAKE93D61 | | root | @ | 127.0.0.1 | *8328225AE4A663FAKEFAKEFAKEFAKEFAKE93D61 | | admin | @ | localhost | *8328225AE4A663FAKEFAKEFAKEFAKEFAKE93D61 | +-------+---+-----------+-------------------------------------------+ 4 rows in set (0.00 sec) I also did a search from root to find any my.cnf files and didn't find any that has user accounts in them. Also I find that for the root accounts I can't seem to login even if I set the password in the database without encryption and copy/paste the password into the prompt. However the non-root account (admin) does let you in with the password. So I'm wondering how to secure mariadb so that it doesnt' let you in without typing in a username and password and also why it doesn't let you log in as 'root'? Is the root account disallowed from logging in by default? Thanks Tim -- GPG me!! gpg --keyserver pool.sks-keyservers.net --recv-keys F186197B
On 08/30/2014 10:12 PM, Tim Dunphy wrote:> Hello, > > I discovered today that CentOS 7 has replaced MySQL with MariaDB. Which is > fine, it's seems really similar. And I was already aware that it was > written by the original team that wrote mysql. > > It's cool that the mysql command still gets you in! > > This is the version I have: > > [root at web1:~] #mysql --version > mysql Ver 15.1 Distrib 5.5.37-MariaDB, for Linux (x86_64) using readline > 5.1 > > But for some reason all I have to do is type the word 'mysql' to get me > into the database. > > That's ok for initial setup I guess. But once I was in a did away with all > the accounts that either had blank set for the username, and updated all > the accounts to use passwords. > > MariaDB [mysql]> select User,'@',Host,Password from user; > +-------+---+-----------+-------------------------------------------+ > > | User | @ | Host | Password | > > +-------+---+-----------+-------------------------------------------+ > > | root | @ | localhost | *8328225AE4A663FAKEFAKEFAKEFAKEFAKE93D61 | > > | root | @ | web1 | *8328225AE4A663FAKEFAKEFAKEFAKEFAKE93D61 | > > | root | @ | 127.0.0.1 | *8328225AE4A663FAKEFAKEFAKEFAKEFAKE93D61 | > > | admin | @ | localhost | *8328225AE4A663FAKEFAKEFAKEFAKEFAKE93D61 | > > +-------+---+-----------+-------------------------------------------+ > > 4 rows in set (0.00 sec) > > I also did a search from root to find any my.cnf files and didn't find any > that has user accounts in them. > > Also I find that for the root accounts I can't seem to login even if I set > the password in the database without encryption and copy/paste the password > into the prompt. > > However the non-root account (admin) does let you in with the password. > > So I'm wondering how to secure mariadb so that it doesnt' let you in > without typing in a username and password and also why it doesn't let you > log in as 'root'? Is the root account disallowed from logging in by default? > > Thanks > Tim >my.cnf doesn't have the passwords. When you first set up mysql, you use the mysqladmin command to set the root password. MariaDB doesn't handle the initial set up any differently than MySQL. man mysqladmin C7 does do some stuff differently with the config as the "real" config files are in /etc/my.cnf.d /etc/my.cnf includes those files to build a config. -- -- Steve
2014-08-31 6:12 GMT+03:00 Tim Dunphy <bluethundr at gmail.com>:> Hello, > > I discovered today that CentOS 7 has replaced MySQL with MariaDB. Which is > fine, it's seems really similar. And I was already aware that it was > written by the original team that wrote mysql. > > It's cool that the mysql command still gets you in! > > This is the version I have: > > [root at web1:~] #mysql --version > mysql Ver 15.1 Distrib 5.5.37-MariaDB, for Linux (x86_64) using readline > 5.1 > > But for some reason all I have to do is type the word 'mysql' to get me > into the database. > > That's ok for initial setup I guess. But once I was in a did away with all > the accounts that either had blank set for the username, and updated all > the accounts to use passwords. > > MariaDB [mysql]> select User,'@',Host,Password from user; > +-------+---+-----------+-------------------------------------------+ > > | User | @ | Host | Password | > > +-------+---+-----------+-------------------------------------------+ > > | root | @ | localhost | *8328225AE4A663FAKEFAKEFAKEFAKEFAKE93D61 | > > | root | @ | web1 | *8328225AE4A663FAKEFAKEFAKEFAKEFAKE93D61 | > > | root | @ | 127.0.0.1 | *8328225AE4A663FAKEFAKEFAKEFAKEFAKE93D61 | > > | admin | @ | localhost | *8328225AE4A663FAKEFAKEFAKEFAKEFAKE93D61 | > > +-------+---+-----------+-------------------------------------------+ > > 4 rows in set (0.00 sec) > > I also did a search from root to find any my.cnf files and didn't find any > that has user accounts in them. > > Also I find that for the root accounts I can't seem to login even if I set > the password in the database without encryption and copy/paste the password > into the prompt. > > However the non-root account (admin) does let you in with the password. > > So I'm wondering how to secure mariadb so that it doesnt' let you in > without typing in a username and password and also why it doesn't let you > log in as 'root'? Is the root account disallowed from logging in by > default? >you need to run http://dev.mysql.com/doc/refman/5.0/en/mysql-secure-installation.html (mysql_secure_installation) command from commandline -- Eero
There is a program "mysql_secure_installation" which can be used to set a root password and remove those accounts. However it sounds like you did the job manually. Did you also issue the sql command "flush privileges"? On Sun, Aug 31, 2014 at 1:12 PM, Tim Dunphy <bluethundr at gmail.com> wrote:> Hello, > > I discovered today that CentOS 7 has replaced MySQL with MariaDB. Which is > fine, it's seems really similar. And I was already aware that it was > written by the original team that wrote mysql. > > It's cool that the mysql command still gets you in! > > This is the version I have: > > [root at web1:~] #mysql --version > mysql Ver 15.1 Distrib 5.5.37-MariaDB, for Linux (x86_64) using readline > 5.1 > > But for some reason all I have to do is type the word 'mysql' to get me > into the database. > > That's ok for initial setup I guess. But once I was in a did away with all > the accounts that either had blank set for the username, and updated all > the accounts to use passwords. > > MariaDB [mysql]> select User,'@',Host,Password from user; > +-------+---+-----------+-------------------------------------------+ > > | User | @ | Host | Password | > > +-------+---+-----------+-------------------------------------------+ > > | root | @ | localhost | *8328225AE4A663FAKEFAKEFAKEFAKEFAKE93D61 | > > | root | @ | web1 | *8328225AE4A663FAKEFAKEFAKEFAKEFAKE93D61 | > > | root | @ | 127.0.0.1 | *8328225AE4A663FAKEFAKEFAKEFAKEFAKE93D61 | > > | admin | @ | localhost | *8328225AE4A663FAKEFAKEFAKEFAKEFAKE93D61 | > > +-------+---+-----------+-------------------------------------------+ > > 4 rows in set (0.00 sec) > > I also did a search from root to find any my.cnf files and didn't find any > that has user accounts in them. > > Also I find that for the root accounts I can't seem to login even if I set > the password in the database without encryption and copy/paste the password > into the prompt. > > However the non-root account (admin) does let you in with the password. > > So I'm wondering how to secure mariadb so that it doesnt' let you in > without typing in a username and password and also why it doesn't let you > log in as 'root'? Is the root account disallowed from logging in by > default? > > Thanks > Tim > > -- > GPG me!! > > gpg --keyserver pool.sks-keyservers.net --recv-keys F186197B > _______________________________________________ > CentOS mailing list > CentOS at centos.org > http://lists.centos.org/mailman/listinfo/centos >
Maybe Matching Threads
- why does centos 7 want to install mariadb instead of mysql ?
- Asterisk realtime - Error with index length in alembic script
- Asterisk realtime - Error with index length in alembic script
- mysql replication - problems
- SOT: MariaDB 5.5.x-MariaDB logs are not going to desired .log file