Centos上安装Mysql(三)

2015-03-04 17:07:58 · 作者: · 浏览: 133
percona-server/5.5/management/udf_percona_toolkit.html for more details

Verifying : Percona-Server-server-55-5.5.37-rel35.0.el6.x86_64 1/1


Installed:

Percona-Server-server-55.x86_64 0:5.5.37-rel35.0.el6


Complete!


5、启动mysql

[vagrant@localhost download]$ chkconfig --list | grep mysql

mysql 0:关闭 1:关闭 2:启用 3:启用 4:启用 5:启用 6:关闭

[vagrant@localhost download]$ sudo service mysql start

Starting MySQL (Percona Server)..... SUCCESS!

[vagrant@localhost download]$ sudo netstat -ntlp | grep mysql

tcp 0 0 0.0.0.0:3306 0.0.0.0:* LISTEN 2768/mysqld

6、创建mysql 用户

非root创建失败。

[vagrant@localhost ~]$ mysql

Welcome to the MySQL monitor. Commands end with ; or \g.

Your MySQL connection id is 2

Server version: 5.5.37-35.0 Percona Server (GPL), Release rel35.0, Revision 657


Copyright (c) 2009-2014 Percona LLC and/or its affiliates

Copyright (c) 2000, 2014, Oracle and/or its affiliates. All rights reserved.


Oracle is a registered trademark of Oracle Corporation and/or its

affiliates. Other names may be trademarks of their respective

owners.


Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.


mysql> CREATE USER dummy IDENTIFIED BY '123';

ERROR 1227 (42000): Access denied; you need (at least one of) the CREATE USER privilege(s) for this operation

root权限创建成功。

[vagrant@localhost ~]$ sudo mysql

Welcome to the MySQL monitor. Commands end with ; or \g.

Your MySQL connection id is 3

Server version: 5.5.37-35.0 Percona Server (GPL), Release rel35.0, Revision 657


Copyright (c) 2009-2014 Percona LLC and/or its affiliates

Copyright (c) 2000, 2014, Oracle and/or its affiliates. All rights reserved.


Oracle is a registered trademark of Oracle Corporation and/or its

affiliates. Other names may be trademarks of their respective

owners.


Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.


mysql> CREATE USER dummy IDENTIFIED BY '123';

Query OK, 0 rows affected (0.03 sec)


mysql> GRANT ALL ON *.* TO dummy;

Query OK, 0 rows affected (0.01 sec)

7、用新增用户登录mysql

[vagrant@localhost ~]$ sudo mysql -udummy -p

Enter password:

ERROR 1045 (28000): Access denied for user 'dummy'@'localhost' (using password: YES)

晕。。。。。。新增用户无法登录数据库。。。。。

原因暂时未找到。。。

继续用默认的root的账号。