Linux MySQL5.5的安装
[root@server1 src]# cd /opt/ipnms/src
[root@server1 src]# tar zxvf cmake-2.8.4.tar.gz
[root@server1 src]# cd cmake-2.8.4
[root@server1 cmake-2.8.4]#./bootstrap
[root@server1 cmake-2.8.4]#gmake
[root@server1 cmake-2.8.4]#gmake install
[root@server1 cmake-2.8.4]#cd ../
用于自动生成语法分析器程序
[root@server1 src]# tar zxvf bison-2.5.tar.gz
[root@server1 src]# cd bison-2.5
[root@server1 bison-2.5]#./configure
[root@server1 bison-2.5]#make
[root@server1 bison-2.5]#make install
[root@server1 bison-2.5]#cd ../
[root@server1 src]#unzip ncurses-devel.zip
[root@server1 src]#rpm -ivh ncurses-devel-5.7-3.20090208.el6.x86_64.rpm
[root@server1 src]#groupadd mysql
[root@server1 src]#useradd -g mysql mysql
[root@server1 src]#tar xvf mysql-5.5.14.tar.gz
[root@server1 src]#cd mysql-5.5.14/
[root@server1 mysql-5.5.14]#cmake . (后面有个.)
[root@server1 mysql-5.5.14]#make
[root@server1 mysql-5.5.14]#make install
[root@server1 mysql-5.5.14]#cd /usr/local/mysql/
[root@server1 mysql]# chown -R mysql .
[root@server1 mysql]# chgrp -R mysql .
mysql_install_db 以缺省权限创建MySQL授权表。这通常仅被执行一次。就是在系统上第一次安装MySQL时。
[root@server1 mysql]#scripts/mysql_install_db --user=mysql
安全启动MySQL(默认密码为空)
[root@server1 mysql]#./bin/mysqld_safe --user=mysql&
MySQL启动成功后,root默认没有密码,我们需要设置root密码。
设置之前,我们需要先设置PATH,可以直接调用mysql修改/etc/profile文件。
[root@localhost mysql]#vi /etc/profile
添加如下代码:
PATH=/usr/local/mysql/bin:$PATH
export PATH
关闭文件,运行下面的命令,让配置立即生效
[root@localhost mysql]# source /etc/profile
连接本机MySQL
[root@localhost mysql]#mysql –u root –p
提示输入password,默认为空,按Enter即可
断开连接
mysql>exit;
为root账户设置密码
[root@localhost mysql]# mysqladmin -u root password 2wE#RFT
Enter Password: 2wE#RFT
拷贝mysql配置文件
[root@localhost mysql]# cp support-files/my-medium.cnf /etc/mysql.cnf
启动时指定mysql的配置文件。
[root@localhost mysql]#/usr/local/mysql/bin/mysqld_safe --defaults-file=/etc/mysql.cnf --user=mysql&
[root@server1 init.d]# vi /etc/rc.d/rc.local结尾添加如下内容:
/usr/local/mysql/bin/mysqld_safe --defaults-file=/etc/mysql.cnf --user=mysql&
最新文章
- angular2系列教程(六)两种pipe:函数式编程与面向对象编程
- C#与Java在继承静态类上的区别
- html学习记录之表格、表单基础
- 基于Open vSwitch搭建虚拟路由器
- labview中的文件格式
- overrides final method getUnknownFields.()Lcom/google/protobuf/UnknownFieldSet 错误解决
- 如何确定Ubuntu下是否对某个CVE打了补丁
- 移动web点5像素的秘密(转)
- EL表达式得不到后台传过来的值
- 手写事件代理函数 (Delegated function)
- Oracle AWR报告详细分析--比较详细
- LAMP动静分离安装(源码安装)
- windows开发各种dll缺失
- Nginx 在 Linux 上的安装和配置
- eNSP 常用操作
- VMware安装win7提示 operating system not found
- CoordinateLayout简介
- 显示锁(一)Lock显示锁的优点
- 奇葩问题:ListView中Item与Item中的Button不能单击问题
- bzoj 3965: [WF2011]Pyramids
热门文章
- substring,subsequence,charAt执行效率的不同
- 【C/C++】高亮C++中函数的重写——函数名相同?参数列表相同?返回值相同?
- Spark源码分析之七:Task运行(一)
- mysql-mongdb-redis
- window下Opengl与vs2012环境配置
- 【转】Android7.0版本以上的手机Eclipse无法打出LogCat
- mac os x升级MOUNTAIN LION后svn command not found的解决
- 提高Interface Builder高效工作的8个技巧
- Eclipse如何删除插件
- 怎么使用Aspose.Cells读取excel 转化为Datatable