免费注册 查看新帖 |

Chinaunix

  平台 论坛 博客 文库
最近访问板块 发新帖
查看: 1315 | 回复: 8
打印 上一主题 下一主题

请帮我看看,我的mysql是什么问题? [复制链接]

论坛徽章:
0
跳转到指定楼层
1 [收藏(0)] [报告]
发表于 2004-01-02 11:22 |只看该作者 |倒序浏览
# ./mysql_install_db
Installing all prepared tables
040102 11:15:42  /usr/local/mysql/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/local/mysql/bin/mysqladmin -u root  password 'new-password'
/usr/local/mysql/bin/mysqladmin -u root -h dgytgs-solaris  password 'new-passwor
d'
See the manual for more instructions.

NOTE:  If you are upgrading from a MySQL <= 3.22.10 you should run
the /usr/local/mysql/bin/mysql_fix_privilege_tables. Otherwise you will not be
able to use the new GRANT command!

You can start the MySQL daemon with:
cd /usr/local/mysql ; /usr/local/mysql/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/local/mysql/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

# ./mysqladmin -u root password '970501'
./mysqladmin: connect to server at 'localhost' failed
error: 'Can't connect to local MySQL server through socket '/tmp/mysql.sock' (14
6)'
Check that mysqld is running and that the socket: '/tmp/mysql.sock' exists!
#

论坛徽章:
0
2 [报告]
发表于 2004-01-02 11:24 |只看该作者

请帮我看看,我的mysql是什么问题?

这个问题,我想回答,我去找找资料

论坛徽章:
0
3 [报告]
发表于 2004-01-02 11:25 |只看该作者

请帮我看看,我的mysql是什么问题?

mysql不能通过'/tmp/mysql.sock'的解决办法
经常有人抱怨配好的php不能连到mysql,但mysql确实又启动了,而且可以正常连接。

这个问题主要提示是,不能通过'/tmp/mysql.sock'连到服务器,而php标准配置正是用过'/tmp/mysql.sock',但是一些mysql安装方法将mysql.sock放在/var/lib/mysql.sock或者其他的什么地方,你可以通过修改/etc/my.conf文件来修正它,打开文件,可以看到如下的东东:

[mysqld]
socket=/var/lib/mysql.sock

改一下就好了,但也会引起其他的问题,如mysql程序连不上了,再加一点:

[mysql]
socket=/tmp/mysql.sock

或者还可以通过修改php.ini中的配置来使php用其他的mysql.sock来连,这个大家自己去找找

还有一个办法:
ln -s /var/lib/mysql/mysql.sock /tmp/mysql.sock

论坛徽章:
0
4 [报告]
发表于 2004-01-02 11:41 |只看该作者

请帮我看看,我的mysql是什么问题?

还是不行呀,

文件都存有呀!

一个在:/tmp/mysql.sock
另一个在:/var/tmp/mysql.sock

不过2个文件内容均为空!

还有,我还没装好php呢!

论坛徽章:
0
5 [报告]
发表于 2004-01-02 11:44 |只看该作者

请帮我看看,我的mysql是什么问题?

原帖由 "mazx1969" 发表:
还是不行呀,

文件都存有呀!

一个在:/tmp/mysql.sock
另一个在:/var/tmp/mysql.sock

不过2个文件内容均为空!

还有,我还没装好php呢!


从起机器吧

论坛徽章:
0
6 [报告]
发表于 2004-01-02 11:48 |只看该作者

请帮我看看,我的mysql是什么问题?

我试试

论坛徽章:
0
7 [报告]
发表于 2004-01-02 11:57 |只看该作者

请帮我看看,我的mysql是什么问题?

重起服务器还是不行,蜘蛛姐姐

# ./safe_mysqld &
325
# Starting mysqld daemon with databases from /usr/local/mysql/var
040102 11:51:18  mysqld ended


# ./mysql_install_db
Installing all prepared tables
040102 11:51:39  /usr/local/mysql/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/local/mysql/bin/mysqladmin -u root  password 'new-password'
/usr/local/mysql/bin/mysqladmin -u root -h dgytgs-solaris  password 'new-passwor
d'
See the manual for more instructions.

NOTE:  If you are upgrading from a MySQL <= 3.22.10 you should run
the /usr/local/mysql/bin/mysql_fix_privilege_tables. Otherwise you will not be
able to use the new GRANT command!

You can start the MySQL daemon with:
cd /usr/local/mysql ; /usr/local/mysql/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/local/mysql/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

# ./mysqlshow
./mysqlshow: Can't connect to local MySQL server through socket '/tmp/mysql.sock
' (146)
#

论坛徽章:
0
8 [报告]
发表于 2004-01-02 12:03 |只看该作者

请帮我看看,我的mysql是什么问题?

To start mysqld at boot time you have to copy support-files/mysql.server
to the right place for your system

论坛徽章:
0
9 [报告]
发表于 2004-01-02 12:15 |只看该作者

请帮我看看,我的mysql是什么问题?

拷到哪儿呢?
您需要登录后才可以回帖 登录 | 注册

本版积分规则 发表回复

  

北京盛拓优讯信息技术有限公司. 版权所有 京ICP备16024965号-6 北京市公安局海淀分局网监中心备案编号:11010802020122 niuxiaotong@pcpop.com 17352615567
未成年举报专区
中国互联网协会会员  联系我们:huangweiwei@itpub.net
感谢所有关心和支持过ChinaUnix的朋友们 转载本站内容请注明原作者名及出处

清除 Cookies - ChinaUnix - Archiver - WAP - TOP