gpt4 book ai didi

mysql - 无法连接到 Opensuse 10.2 中的 mysql

转载 作者:太空宇宙 更新时间:2023-11-03 11:14:03 25 4
gpt4 key购买 nike

我的 mysql 有问题我已经在 YAST 中安装了 mysql 但是在控制台中我输入了这个:

mysql -u root 

它告诉我:

Error 2002: Can't connect to local mysql server through socket '/var/lib/mysql/mysql.sock'

最佳答案

引自 OpenSuSe wiki ( http://en.opensuse.org/SDB:MySQL_installation ):

After the installation of MySQL, it is only installed but it is not running. To make it run, the so called daemon for MySQL (mysqld) must be running. mysqld can be started manually by calling

# rcmysql start

with root privileges. You can check whether it is running by using

# rcmysql status

这对你也很有用:

Another option is to start the daemon is during the boot.

Go to YaST -> System -> System Services (Runlevel). Wait a few seconds before YaST has examined all the Runlevels. Then select mysqld and press the enable button.

Alternatively, you can enable MySQL startup at boot time by issuing

# insserv rcmysql

关于mysql - 无法连接到 Opensuse 10.2 中的 mysql,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/6567508/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com