标签:adl 方法 pcr root用户 nss chm rpo http time
参考:http://blog.csdn.net/mycwq/article/details/24488691
在新装的CentOS 5.7系统中,先安装了nginx(含nginx必备依赖:gzip 模块需要 zlib 库;rewrite 模块需要 pcre 库;ssl 功能需要 openssl 库),结果安装cmake过程中在./bootstrap这一步无法通过,原因未知。后通过VM快照恢复到未安装nginx前,顺利安装cmake。
安装步骤:
官网下载源码安装包:https://cdn.mysql.com//Downloads/MySQL-5.5/mysql-5.5.57.tar.gz
安装mysql
可能还会报这个错,没有就跳过
说明centos系统没有ncurses-devel
再删除刚才编译生成的 CMakeCache.txt 文件,否则无法进行下一步
继续编译mysql
这样,mysql默认将成功安装到/usr/local/mysql
创建mysql用户组
启动mysql
这里可能会发生错误,没有就跳过:
解决方法:
再启动mysql
注册mysql服务,开机自动启动
1.设置mysql配置文件到/etc目录
2.设置mysql开机自启
3.启动mysql服务
测试mysql是否安装成功
参考:
http://blog.csdn.net/mycwq/article/details/24488691
最后启动mysql的时候报错,出现The server quit without updating PID file错误
解决过程:http://blog.sina.com.cn/s/blog_637e04c9010117ri.html
[root@localhost ~]# cd /usr/local/mysql
[root@localhost mysql]# chown
-R mysql.mysql .
[root@localhost mysql]# su - mysql
[mysql@localhost ~]$ cd
/usr/local/mysql
[mysql@localhost mysql]$ scripts/mysql_install_db
Installing MySQL system tables...
OK
Filling help tables...
OK
To start mysqld at boot time you
have to copy
support-files/mysql.server to the right place for your system
PLEASE REMEMBER TO SET A PASSWORD
FOR THE MySQL root USER !
To do so, start the server, then issue the following commands:
./bin/mysqladmin -u root password
‘new-password‘
./bin/mysqladmin -u root -h localhost.localdomain password ‘new-password‘
Alternatively you can run:
./bin/mysql_secure_installation
which will also give you the option
of removing the test
databases and anonymous user created by default. This is
strongly recommended for production servers.
See the manual for more instructions.
You can start the MySQL daemon
with:
cd . ; ./bin/mysqld_safe &
You can test the MySQL daemon with
mysql-test-run.pl
cd ./mysql-test ; perl mysql-test-run.pl
Please report any problems with the ./bin/mysqlbug script!
[mysql@localhost mysql]$ /usr/local/mysql/bin/mysqld_safe
--user=mysql &
[1] 11767
[mysql@localhost mysql]$ 120502 07:01:17 mysqld_safe Logging to
‘/usr/local/mysql/data/localhost.localdomain.err‘.
120502 07:01:17 mysqld_safe Starting mysqld daemon with databases from
/usr/local/mysql/data
[mysql@localhost mysql]$ /etc/rc.d/init.d/mysql status
MySQL running
(11830) [ OK ]
[mysql@localhost mysql]$ /etc/rc.d/init.d/mysql start
Starting
MySQL [ OK ]
最后这里↗$ /etc/rc.d/init.d/mysql start可能需要切回root用户才能成功启动
额外配置
如果非本地环境无法登陆mysql,做如下更改
1.Centos中防火墙开放3306端口:
-A INPUT -p tcp -m tcp --dport 3306 -j ACCEPT
2.Mysql中允许root用户任意IP登陆:
Update user set host=”%” where user=”root”;
3. mysql取消表名区分大小写
修改 /etc/my.cnf:在[mysqld]节点下,加入一行: lower_case_table_names=1
4.使用mysql-workbench工具导入.sql文件
标签:adl 方法 pcr root用户 nss chm rpo http time
原文地址:http://www.cnblogs.com/sherman125/p/7672577.html