时间:2021-05-25
我下载的是目前最新的版本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...
声明:本页内容来源网络,仅供用户参考;我单位不保证亦不表示资料全面及准确无误,也不保证亦不表示这些资料为最新信息,如因任何原因,本网内容或者用户因倚赖本网内容造成任何损失或损害,我单位将不会负任何法律责任。如涉及版权问题,请提交至online#300.cn邮箱联系删除。
准备工作您需要获取Fedora的安装dvd镜像,Fedora8中,这个文件是Fedora-8-i386-DVD.iso,请把它放在fat或者ext的分区中,如果
在fedora8上安装apache>tar-zxvfhttpd-2.2.8.tar.gz>cdhttpd-2.2.8>./configure--prefix=/
对于习惯了从右键打开终端的人来说fedora8中右键无打开终端确实有点痛苦。现在有解决的办法了只要安装一个软件包就能解决。#yuminstallnautilus
Fedora5下配置MySQL(很有参考价值的MySQL资料包括如何在linux文件系统移动MySQL数据库的位置)一、下载MySQL安装文件完全安装MySQL
下载了Fedora11DVDISO镜像文件,参考了XP下硬盘安装Fedora10的方法,我把安装过程稍微整理一下供Linux新手参考。先看看Fedora的版本是