用源码安装mysql5.5到ubuntu13.04
来源:互联网 发布:java代码整洁之道 编辑:程序博客网 时间:2024/06/05 22:57
选择源码下载:source code
文件:mysql-5.5.9.tar.gz
下载后在下载目录
$ sudo tar zxvf mysql-5.5.9.tar.gz
查看文件夹下INSTALL-SOURCE文件,里面有各个系统的编译安装方式(英文)
注意,安装前应当注意安装工具的完善,否则编译的时候将出错,这里先给出安装命令。
sudo apt-get install cmake;sudo apt-get install bzr;sudo apt-get install bison;sudo apt-get install libncurses5-dev;sudo apt-get install g++;linux下源码的安装方式如下:
# 安装前配置
shell> groupadd mysqlshell> useradd -r -g mysql mysql
# 开始源码编译安装
shell> tar zxvf mysql-VERSION.tar.gzshell> cd mysql-VERSIONshell> cmake . \-DCMAKE_INSTALL_PREFIX=/usr/local/mysql \-DINSTALL_DATADIR=/usr/local/mysql/data \-DDEFAULT_CHARSET=utf8 \-DDEFAULT_COLLATION=utf8_general_ci \-DEXTRA_CHARSETS=all \-DENABLED_LOCAL_INFILE=1shell> makeshell> make install
# 结束编译安装
# 初始化,下列命令使mysql得到对数据库文件的拥有权。mysql_install_db脚本能刷新授权表
shell> cd /usr/local/mysql
shell> chown -R mysql .
shell> chgrp -R mysql .
shell> scripts/mysql_install_db --user=mysql
shell> chown -R root .
shell> chown -R mysql data
# 可选命令,配置文件位置更改,且内有五种配置模式。
shell> cp support-files/my-medium.cnf /etc/my.cnf
shell> bin/mysqld_safe --user=mysql &
# 可选命令,自启动脚本,可以mysql自动启动。
shell> cp support-files/mysql.server /etc/init.d/mysql.server
开启mysql:
cd . ; ./bin/mysqld_safe &
当然你用root命令开启的时候,应当使用--user参数,这样才是安全的启动方式。
cd . ; ./bin/mysqld_safe --user=mysql &
为root和你的用户名设置密码,这需要在你先启动mysql的基础上,否则会报错,说你没有连接到端口:
./bin/mysqladmin -u root password 'new-password'
./bin/mysqladmin -u root -h YourusernamE password 'new-password'
也可一用下命令替代:
./bin/mysql_secure_installation
- 用源码安装mysql5.5到ubuntu13.04
- Ubuntu13.04 下MySQL5.6安装过程
- Ubuntu13.04下源码安装mysql
- Ubuntu13.04下源码安装MySQL
- ubuntu13.10源码安装php5.5
- ubuntu13.10源码安装php5.5
- Ubuntu13.10下用源码安装Codeblocks
- Linux 源码安装Mysql5.5
- linux 源码安装mysql5.5
- 源码编译安装 Mysql5.5
- mysql5.5源码编译安装
- ubuntu13.04安装openyoudao
- Ubuntu13.04安装Matlab
- ubuntu13.04安装jdk7
- ubuntu13.04 rabbitvcs安装
- ubuntu13.04安装笔记
- Ubuntu13.04 安装samba
- Ubuntu13.04 安装Redmine
- android中使用smack库时,遇到错误:java.lang.NullPointerException
- 【Effective Java】Ch4_Class:Item15_使可变性最小化
- 配置android开发环境to mac
- List拷贝另一个List的数据
- 获取新插入Oracle数据库Sequence值的5种方法
- 用源码安装mysql5.5到ubuntu13.04
- Powershell获取当前路径
- Citrix Troubleshooting methodology
- Cadence_SPB16.5详细安装说明
- 求奖金总和
- Viewport解决分辨率适配问题
- Base64.dll ExecCmd.dll nsis7z.dll xml.dll ZipDLL.dll
- 别名& 的使用
- 在Eclipse中使用JUnit4进行单元测试(初级篇)