免费注册 查看新帖 |

Chinaunix

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

怎么启动linux自带的mysql?在线等 [复制链接]

论坛徽章:
0
跳转到指定楼层
1 [收藏(0)] [报告]
发表于 2005-11-09 10:22 |只看该作者 |倒序浏览
小弟我装了RedHat Linux3 V4,安装的时候就把mysql给选中安装。系统安装成功后,怎么启动mysql,如何让它自动启动。我直接键入mysql,系统提示error 2002(HY000):Can't connect to local MySQL Server through socker 'var/lib/mysql/mysql.sock'。
mysqld这个进程存在,但没有查到3306端口,怎么解决这个问题,各位老大给个意见。谢谢!!!

论坛徽章:
0
2 [报告]
发表于 2005-11-09 13:10 |只看该作者
方法一: service mysqld start
    二:safe_mysqld

论坛徽章:
0
3 [报告]
发表于 2005-11-09 14:49 |只看该作者
都不行,用service mysqld start,系统提示没有此服务,用safe_mysqld系统提示没有此命令

论坛徽章:
0
4 [报告]
发表于 2005-11-10 08:00 |只看该作者
????

论坛徽章:
0
5 [报告]
发表于 2005-11-10 11:40 |只看该作者
哥们,我也有这个问题,我现在连自带的MYSQL删都删不掉了,烦人啊

论坛徽章:
0
6 [报告]
发表于 2005-11-10 11:42 |只看该作者
bin/mysqladmin -u root password "yourpasswd" 基于安全的原因,为root用户设置密码才能让root用户登陆mysql,不然会有2002错误出现

找到一个大侠的话,给你看看,反正我试在我的机子上是不行的了

论坛徽章:
0
7 [报告]
发表于 2005-11-11 07:47 |只看该作者
root是指mysql的root密码么?如何改

论坛徽章:
0
8 [报告]
发表于 2005-11-12 00:28 |只看该作者
数据库没有启动
运行 # /etc/init.d/mysqld start

论坛徽章:
0
9 [报告]
发表于 2005-11-14 10:25 |只看该作者
启动不了,mysql启动,就提示2002错误

论坛徽章:
0
10 [报告]
发表于 2005-11-14 10:45 |只看该作者
How to Protect or Change the MySQL Socket File /tmp/mysql.sock
The default location for the Unix socket file that the server uses for communication with local clients is /tmp/mysql.sock. This might cause problems, because on some versions of Unix, anyone can delete files in the /tmp directory.

On most versions of Unix, you can protect your /tmp directory so that files can be deleted only by their owners or the superuser (root). To do this, set the sticky bit on the /tmp directory by logging in as root and using the following command:

shell> chmod +t /tmp

You can check whether the sticky bit is set by executing ls -ld /tmp. If the last permission character is t, the bit is set.

Another approach is to change the place where the server creates the Unix socket file. If you do this, you should also let client programs know the new location of the file. You can specify the file location in several ways:

Specify the path in a global or local option file. For example, put the following lines in /etc/my.cnf:

[mysqld]
socket=/path/to/socket

[client]
socket=/path/to/socket

See the section called “Using Option Files”.

Specify a --socket option on the command line to mysqld_safe and when you run client programs.

Set the MYSQL_UNIX_PORT environment variable to the path of the Unix socket file.

Recompile MySQL from source to use a different default Unix socket file location. Define the path to the file with the --with-unix-socket-path option when you run configure. See the section called “Typical configure Options”.

You can test whether the new socket location works by attempting to connect to the server with this command:

shell> mysqladmin --socket=/path/to/socket version
您需要登录后才可以回帖 登录 | 注册

本版积分规则 发表回复

  

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

清除 Cookies - ChinaUnix - Archiver - WAP - TOP