# groupadd mysql
# useradd -g mysql mysql
# cd /usr/local
# gunzip < /PATH/TO/MYSQL-VERSION-OS.tar.gz | tar xvf -
# ln -s FULL-PATH-TO-MYSQL-VERSION-OS mysql
# cd mysql
# scripts/mysql_install_db --user=mysql
# chown -R root .
# chown -R mysql data
# chgrp -R mysql .
# bin/mysqld_safe --user=mysql &
# ./bin/mysqladmin -u root password "yourpasswd"
# cd /usr/local/mysql/support-files
# cp mysql.server /etc/init.d/mysql
# cd /etc/rc3.d
# ln –s ../init.d/mysql S85mysql
# ln –s ../init.d/mysql K85mysql
# cd /etc/rc5.d
# ln –s ../init.d/mysql S85mysql
# ln –s ../init.d/mysql K85mysql
# cd ../init.d
# chmod 755 mysql
基本操作命令:
create database roller;(创建数据库)
mysql> grant all on roller.* to user1 identified by '123456';
(赋予权限)
mysql> grant all on roller.* to identified by '123456';(赋予权限)
set password for ");(设置用户密码)
阅读(1571) | 评论(0) | 转发(0) |