关于MYSQL问题
我在启动MYSQL时出了问题:
检查了MYSQL文件状态,显示都正常.
[root@localhost root]# rpm -qs mysql-server-3.23.54a-11
normal /etc/logrotate.d/mysqld
normal /etc/rc.d/init.d/mysqld
normal /usr/bin/mysqladmin
normal /usr/bin/safe_mysqld
normal /usr/libexec/mysqld
normal /usr/share/doc/mysql-server-3.23.54a
normal /usr/share/doc/mysql-server-3.23.54a/my-huge.cnf
normal /usr/share/doc/mysql-server-3.23.54a/my-large.cnf
normal /usr/share/doc/mysql-server-3.23.54a/my-medium.cnf
normal /usr/share/doc/mysql-server-3.23.54a/my-small.cnf
normal /var/lib/mysql
normal /var/run/mysqld
也初始化了MYSQL,步骤如下:
[root@localhost root]# cd /usr
[root@localhost usr]# ls
bin etc include lib local share tmp
dict games kerberos libexec sbin src X11R6
[root@localhost usr]# cd bin
[root@localhost bin]# ls|less
[root@localhost bin]# script
Script started, file is typescript
[root@localhost bin]# mysql_install_db
Preparing db table
Preparing host table
Preparing user table
Preparing func table
Preparing tables_priv table
Preparing columns_priv table
Installing all prepared tables
040412 22:37:59 /usr/libexec/mysqld: Shutdown Complete
To start mysqld at boot time you have to copy support-files/mysql.server
to the right place for your system
PLEASE REMEMBER TO SET A PASSWORD FOR THE MySQL root USER !
This is done with:
/usr/bin/mysqladmin -u root password 'new-password'
/usr/bin/mysqladmin -u root -h localhost.localdomain password 'new-password'
See the manual for more instructions.
You can start the MySQL daemon with:
cd /usr ; /usr/bin/safe_mysqld &
You can test the MySQL daemon with the benchmarks in the 'sql-bench' directory:
cd sql-bench ; run-all-tests
Please report any problems with the /usr/bin/mysqlbug script!
The latest information about MySQL is available on the web at
http://www.mysql.com
Support MySQL by buying support/licenses at https://order.mysql.com
测试是否能够正常使用时,操作及显示如下:
[root@localhost bin]# safe_mysqld
Starting mysqld daemon with databases from /var/lib/mysql
040412 22:43:23 mysqld ended
请问这样能用了吗?
[root@localhost bin]# mysqladmin version
mysqladmin: connect to server at 'localhost' failed
error: 'Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (111)'
Check that mysqld is running and that the socket: '/var/lib/mysql/mysql.sock' exists!
但是有那个文件如下所示:
[root@localhost bin]# cd /var/lib/mysql
[root@localhost mysql]# ls
mysql mysql.sock test
请问是什么原因?我装系统时选的装所有软件包,所以我只做了刚才那些初始化和启动的工作.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(8)
没人回贴吗~~~~~哭死了~~~~谢谢大家了.
你安装的是系统默认的mysql是吗?应该是rpm的包。你可能问题出在服务没有启动呀!
#service mysqld start
我确实装的RPM包.刚接触LINUX还找不到北呢.
我之后用/etc/rc.d/init.d/mysqld start启动 MySQL:显示为 [ 确定 ]
后来用usr/bin/mysqladmin -u root password 'new-password'
/usr/bin/mysqladmin -u root -h localhost.localdomain password 'new-password'
设置了密码,我两个密码写的不是一样的,不知道有没有关西?然后再
[root@localhost bin]# mysqladmin version
mysqladmin: connect to server at 'localhost' failed
error: 'Access denied for user: 'root@localhost' (Using password: NO)'
想用usr/bin/mysqladmin -u root password 'new-password' 改密码时,也是出同样的错误信息.
请问这是怎么回事??我需要改写什么??那个密码我是不是设置错了??多谢!!郁闷中..............
i will try,many thanks.
如果是两个不一样的话,你用哪一个呢?应该是用后一个吧?
这样试试:
# service mysqld stop
# rm -f /var/lib/mysql/mysql.sock
# /usr/bin/safe_mysqld &
# mysqladmin -u root password newpasswd
关于你自动加载CD-ROM的问题:你可以安装上automount-*.*.rpm试试。
谢谢,我试试.