среда, 4 апреля 2012 г.

Памятка mySQL

UPDATE


yum install mysql-server
 
service mysqld start 
 
mysql_secure_installation
 
chkconfig --level 2345 mysqld on
service mysqld start 
 
-------------------------------------------------------------------------------- 
# show user info

mysql>

select user,host,password from mysql.user;


# set root password

mysql>

set password for root@localhost=password('password');

Query OK, 0 rows affected (0.00 sec)
# set root password

mysql>

set password for root@'127.0.0.1'=password('password');

Query OK, 0 rows affected (0.00 sec)
# set root password

mysql>

set password for root@'www.server.world'=password('password');

Query OK, 0 rows affected (0.00 sec)
# delete anonymous user

mysql>

delete from mysql.user where user='';

Query OK, 2 rows affected (0.00 sec)
mysql>
select user,host,password from mysql.user;


mysql>
exit
# quit
 

Комментариев нет:

Отправить комментарий