添加链接
link之家
链接快照平台
  • 输入网页链接,自动生成快照
  • 标签化管理网页链接
启动后显示:[root@ZL~]#Startingmysqlddaemonwithdatabasesfrom/usr/local/mysql5.0.45/varSTOPPINGserverfrompidfile/usr/local/mysql5.0.45/var/ZL.pid09012319:04:01mysqldended查... 启动后显示:
[root@ZL ~]# Starting mysqld daemon with databases from /usr/local/mysql5.0.45/var
STOPPING server from pid file /usr/local/mysql5.0.45/var/ZL.pid
090123 19:04:01 mysqld ended
查看日志:less /var/log/mysqld.log
显示如下:
090123 17:05:39 mysqld started
InnoDB: The first specified data file ./ibdata1 did not exist:
InnoDB: a new database to be created!
090123 17:05:39 InnoDB: Setting file ./ibdata1 size to 10 MB
InnoDB: Database physically writes the file full: wait...
090123 17:05:40 InnoDB: Log file ./ib_logfile0 did not exist: new to be created
InnoDB: Setting log file ./ib_logfile0 size to 5 MB
InnoDB: Database physically writes the file full: wait...
090123 17:05:40 InnoDB: Log file ./ib_logfile1 did not exist: new to be created
InnoDB: Setting log file ./ib_logfile1 size to 5 MB
InnoDB: Database physically writes the file full: wait...
InnoDB: Doublewrite buffer not found: creating new
InnoDB: Doublewrite buffer created
InnoDB: Creating foreign key constraint system tables
InnoDB: Foreign key constraint system tables created
090123 17:05:41 InnoDB: Started; log sequence number 0 0
/usr/libexec/mysqld: ready for connections.
Version: '4.1.20' socket: '/var/lib/mysql/mysql.sock' port: 3306 Source distribution
090123 17:11:48 [Note] /usr/libexec/mysqld: Normal shutdown

090123 17:11:48 InnoDB: Starting shutdown...
090123 17:11:50 InnoDB: Shutdown completed; log sequence number 0 43634
090123 17:11:50 [Note] /usr/libexec/mysqld: Shutdown complete

090123 17:11:50 mysqld ended

090123 17:14:02 mysqld started
090123 17:14:03 InnoDB: Started; log sequence number 0 43634
/usr/libexec/mysqld: ready for connections.
Version: '4.1.20' socket: '/var/lib/mysql/mysql.sock' port: 3306 Source distribution
090123 17:26:21 mysqld started
090123 17:26:22 InnoDB: Started; log sequence number 0 43634
/usr/libexec/mysqld: ready for connections.
Version: '4.1.20' socket: '/var/lib/mysql/mysql.sock' port: 3306 Source distribution 启动mysql时报错的解决(mysql 5.0.45 redhat as 43)
启动mysql时报错:
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/
由于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 SmartProxy海外住宅IP,覆盖全球200+国家和地区,高匿稳定,动态住宅代理/静态住宅代理/账密提取,原生住宅IP,城市级定位,支持HTTP/HTTPS/SOCKS5协议,不限带宽,纯净高匿,网络集成更快捷,注册即送流量!选择Smartproxy的理由:1、整合真实家庭住宅IP,汇... 点击进入详情页 本回答由 SmartProxy 提供