时间:2023-11-23人气:作者:佚名
我下载的是目前最新的版本mysql-5.0.45-linux-i686.tar.gz
安装过程:
su 到root 权限。
#tar -zvxf mysql-5.0.45-linux-i686.tar.gz
#mv mysql-5.0.45/ /usr/local/mysql
#cd /usr/local/mysql
#groupadd mysql
#useradd -g mysql mysql
#chown -R mysql .
#chgrp -R mysql .
#scripts/mysql_install_db --user=mysql
#chown -R root .
#chown -R mysql data
#bin/mysqld_safe --user=mysql &
按照官方文档说这就应该能启动了,可是报错如下:
nohup: ignoring input and redirecting stderr to stdout
Starting mysqld daemon with databases from /var/lib/mysql
STOPPING server from pid file /var/run/mysqld/mysqld.pid
071112 00:22:06 mysqld ended
查看日志:
#less /var/log/mysqld.log
其中有一段如下:
071112 0:22:06 [ERROR] /usr/local/mysql/bin/mysqld: Can't create/write to file '/var/run/mysqld/mysqld.pid' (Errcode: 2)
071112 0:22:06 [ERROR] Can't start server: can't create PID file: No such file or directory
071112 00:22:06 mysqld ended
#cd /var/run/
#ls
mysqld目录不存在
#mkdir /var/run/mysqld
#cd /var/run/mysqld
创建文件mysqld.pid
#touch mysqld.pid
#cd..
#chown -R mysql mysqld .
#cd /usr/local/mysql/
#bin/mysqld_safe --user=mysql &
nohup: ignoring input and redirecting stderr to stdout
Starting mysqld daemon with databases from /var/lib/mysql
能正常启动
#bin/mysqladmin -u root password root
又出错
[root@localhost mysql]# bin/mysqladmin -u root password root
bin/mysqladmin: connect to server at 'localhost' failed
error: 'Can't connect to local MySQL server through socket '/tmp/mysql.sock' (2)'
Check that mysqld is running and that the socket: '/tmp/mysql.sock' exists!
[root@localhost mysql]# bin/mysql -u root -p
Enter password:
ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/tmp/mysql.sock' (2)
分析:是/tmp/mysql.sock 不存在
# cd /var/lib/mysql/
ibdata1 ib_logfile0 ib_logfile1 mysql/ mysql.sock test/
由于mysql 默认的mysql.sock 是在/var/lib/mysql/mysql.sock,
创建符号连接:
# ln -s /var/lib/mysql/mysql.sock /tmp/mysql.sock
# bin/mysql -u root
Welcome to the MySQL monitor. Commands end with ; or /g.
Your MySQL connection id is 1
Server version: 5.0.45 MySQL Community Server (GPL)
Type 'help;' or '/h' for help. Type '/c' to clear the buffer.
mysql>
修改root 密码
#cd /usr/local/mysql/
#bin/mysqladmin -u root -p password yourpassword
一切ok.
一切ok...
转转支持花呗吗,转转是可以用花呗分期的,使用分期付款的方法如下:1、首先在手机中找到转转App,并点击进入。2、然后找到想要购买的商品,并点击进入到选购界面。3、接着选好商品颜色、型号等,点击
(2)人喜欢2023-11-24商家怎么修改配送范围,以饿了么为例,不是所有的饿了么商家都可以自定义设置的,这个的限定条件就在于是否是自配送,只有选择自配送的商家才可以自己修改配送范围。配送范围修改方法是:1、与平台联系,提
(2)人喜欢2023-11-24拼多多到货了怎么通知,拼多多到货了的通知方法如下:1、不管是在哪里购买的物品,快递都会送件**的。即使不能直接送到家,快件到达收件地时,快递员也会电话通知领取。2、拼多多到货会提醒。只要关注了
(2)人喜欢2023-11-24bo丫是什么牌子衣服,bo丫是伦敦男孩牌子衣服。
(2)人喜欢2023-11-24转转支持花呗吗,转转是可以用花呗分期的,使用分期付款的方法如下:1、首先在手机中找到转转App,并点击进入。2、然后找到想要购买的商品,并点击进入到选购界面。3、接着选好商品颜色、型号等,点击
(2)人喜欢2023-11-24商家怎么修改配送范围,以饿了么为例,不是所有的饿了么商家都可以自定义设置的,这个的限定条件就在于是否是自配送,只有选择自配送的商家才可以自己修改配送范围。配送范围修改方法是:1、与平台联系,提
(2)人喜欢2023-11-24拼多多到货了怎么通知,拼多多到货了的通知方法如下:1、不管是在哪里购买的物品,快递都会送件**的。即使不能直接送到家,快件到达收件地时,快递员也会电话通知领取。2、拼多多到货会提醒。只要关注了
(2)人喜欢2023-11-24bo丫是什么牌子衣服,bo丫是伦敦男孩牌子衣服。
(2)人喜欢2023-11-24