mysql5.5.9 安装文档( FOR SUSE LINUX)
项目即将启动,需要搭建数据库服务器,感谢项目组把这个光荣的任务交给了我。
下面简单的将 mysql5.5.9 的安装过程介绍一下。
一、
Mysql5.5.9 的安装
我获得的软件包是 mysql-5.5.9.tar.gz ,经过庆哥的指导,我第一步是先给 Linux 增加用户和
用户组:
linux-749p:~ #usaeradd –d /home/mysql –s /bin/sh mysql
linux-749p:~ #grouadd mysql
linux-749p:~ #useradd –g mysql mysql
第二步:就是把 mysql-5.5.9.tar.gz 拷贝到用户 /home/mysql 目录下,使用
tar –xvf mysql-5.5.9.tar.gz 命令解压包, 之后在当前目录下会看到 mysql-5.5.9 目录。 第三步:
进入 mysql-5.5.9 目录,先后运行
make
make install
第四步 :安装数据库
chown -R mysql:mysql /usr/local/mysql ;改变 mysql 目录的所有者。
/usr/local/mysql/scripts/mysql_install_db --user=mysql ,以 mysql 用户安装数据库
到此处时,系统提示出错:
FATAL ERROR: Could not find ./bin/my_print_defaults
If you compiled from source, you need to run 'make install' to
copy the software into the correct location ready for operation.
If you are using a binary release, you must either be at the top
level of the extracted archive, or pass the --basedir option
pointing to that location.
经过庆哥指导与上网查阅资料了解到其出错原因是:找不到路径。
这个时候我们需要这样解决: