5、让mysql数据库更安全
mysql -u root -p [此时会要求你输入刚刚设置的密码,输入后回车即可]
mysql> DROP DATABASE test; [删除test数据库]
mysql> DELETE FROM mysql.user WHERE user = ''; [删除匿名帐户]
mysql> FLUSH PRIVILEGES; [重载权限]
6、 新建一个数据库,添加一个数据库用户,设置用户权限。
mysql> CREATE DATABASE eexu_db;
mysql> GRANT ALL PRIVILEGES ON eexu_db.* TO 'user'@'localhost' IDENTIFIED BY 'password';
[mysqld]
datadir=/var/lib/mysql
socket=/var/lib/mysql/mysql.sock
user=mysql
# Default to using old password format for compatibility with mysql 3.x
# clients (those using the mysqlclient10 compatibility package).
old_passwords=1