[root@localhost mysql]# ll /data/mysql/ 查看mysql目录下的权限
总用量 680
drwx------ 2 mysql root 4096 2月 27 22:16 mysql
-rw-rw---- 1 mysql mysql 15204 2月 27 22:16 mysql- bin.000001
-rw-rw---- 1 mysql mysql 639172 2月 27 22:16 mysql-bin.000002
-rw-rw---- 1 mysql mysql 38 2 月 27 22:16 mysql-bin.index
drwx------ 2 mysql root 4096 2月 27 22:16 test
[root@localhost mysql]# chown -R mysql.mysql /data/mysql/ 将data/mysql/下的文件都初始化成mysql用户权限
六、启动mysql服务
[root@localhost bin]# cd /mysql/bin 进入mysql/bin目录下
[root@localhost bin]# ./mysqld_safe --user=mysql & 启动mysql服务
[root@localhost bin]# export PATH=$PATH:/usr/local/mysql/bin/ 设置mysql的PATH路径
[root@localhost bin]# mysql -uroot 直接mysql -uroot 启动
Welcome to the MySQL monitor. Commands end with ; or g.
Your MySQL connection id is 1
Server version: 5.0.87-log MySQL Community Server (GPL)
Type 'help;' or 'h' for help. Type 'c' to clear the current input statement.
mysql>
哈哈!成功进入mysql ,不容易啊,虽然步骤不多,但也花费了我不少时间。自我骄傲一下! (编辑:淮北站长网)
【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容!
|