日韩性视频-久久久蜜桃-www中文字幕-在线中文字幕av-亚洲欧美一区二区三区四区-撸久久-香蕉视频一区-久久无码精品丰满人妻-国产高潮av-激情福利社-日韩av网址大全-国产精品久久999-日本五十路在线-性欧美在线-久久99精品波多结衣一区-男女午夜免费视频-黑人极品ⅴideos精品欧美棵-人人妻人人澡人人爽精品欧美一区-日韩一区在线看-欧美a级在线免费观看

歡迎訪問 生活随笔!

生活随笔

當(dāng)前位置: 首頁 > 运维知识 > 数据库 >内容正文

数据库

mysql 5.1编译参数和编译方法

發(fā)布時間:2024/4/13 数据库 18 豆豆
生活随笔 收集整理的這篇文章主要介紹了 mysql 5.1编译参数和编译方法 小編覺得挺不錯的,現(xiàn)在分享給大家,幫大家做個參考.

一。下載:

??? 1.wget

??? 2.解壓

二。編譯:

??? 1.參數(shù):

???

??./configure?\--prefix=/usr/local/mysql?\ --with-unix-socket-path=/usr/local/mysql/tmp/mysql.sock?\ --localstatedir=/usr/local/mysql/data?\ --enable-assembler?\ --enable-thread-safe-client?\ --with-mysqld-user=mysql?\ --with-big-tables?\ --without-debug?\ --with-pthread?\ --with-extra-charsets=complex?\ --with-readline?\ --with-ssl?\ --with-embedded-server?\ --enable-local-infile?\ --with-plugins=partition,innobase?\--with-plugin-PLUGIN?\ --with-mysqld-ldflags=-all-static?\ --with-client-ldflags=-all-static2.make?&&?make?intall3.復(fù)制mysql配置文件,此處為測試,使用占用資源最少的small.cnfcp?my-small.cnf?/etc/my.cnf

4.建立安裝文件目錄。并把文件夾的屬主遞歸改為mysql

? mkdir -p /usr/local/mysql

? chown -R mysql.mysql /usr/local/mysql/

? 5.安裝數(shù)據(jù)庫:

? /usr/local/mysql/bin/mysql_install_db --user=mysql

?6.修復(fù)警告

WARNING: The host 'ser200' could not be looked up with resolveip.
This probably means that your libc libraries are not 100 % compatible
with this binary MySQL version. The MySQL daemon, mysqld, should work
normally with the exception that host name resolving will not work.
This means that you should use IP addresses instead of hostnames
when specifying MySQL privileges !
Installing MySQL system tables...
141018 15:29:28 [Warning] '--skip-locking' is deprecated and will be removed in a future release. Please use '--skip-external-locking' instead.
OK
Filling help tables...
141018 15:29:28 [Warning] '--skip-locking' is deprecated and will be removed in a future release. Please use '--skip-external-locking' instead.
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:

/usr/local/mysql/bin/mysqladmin -u root password 'new-password'
/usr/local/mysql/bin/mysqladmin -u root -h ser200 password 'new-password'


VI修改hosts文件,增加mysql

[root@ser200 data]# cat /etc/hosts
# Do not remove the following line, or various programs
# that require network functionality will fail.
127.0.0.1?????????????? mysql ser150??? localhost
::1???????????? localhost6.localdomain6 localhost6

7.增加環(huán)境變量mysql路徑

[root@ser200 data]# echo "export PATH=$PATH:/usr/local/mysql/bin">> /etc/profile

[root@ser200 data]# . /etc/profile
[root@ser200 data]# echo $PATH


8.增加mysql 自啟動和init.d的服務(wù)器啟動2種方式

[root@ser200 data]# cp /home/oldboy/tools/mysql-5.1.73/support-files/mysql.server /etc/init.d/mysqld
[root@ser200 data]# chmod 700 /etc/init.d/mysqld
[root@ser200 data]# ll /etc/init.d/mysqld
-rwx------ 1 root root 12533 Oct 18 15:54 /etc/init.d/mysqld

===========================================================

[root@ser200 data]# chkconfig --add mysql

[root@ser200 data]# chkconfig --list|grep mysqld
mysqld????????? 0:off?? 1:off?? 2:on??? 3:on??? 4:on??? 5:on??? 6:off


9.刪除mysql庫user表多余的用戶

mysql> select user,host from user;?? ?
+------+-----------+
| user | host????? |
+------+-----------+
| root | 127.0.0.1 |
|????? | localhost |
| root | localhost |
|????? | ser200??? |
| root | ser200??? |
+------+-----------+
5 rows in set (0.00 sec)

mysql> drop user ""@localhost

mysql> drop user ""@ser200

mysql>drop user root@ser200

mysql> drop user root@ser200


轉(zhuǎn)載于:https://blog.51cto.com/txidc/1565365

總結(jié)

以上是生活随笔為你收集整理的mysql 5.1编译参数和编译方法的全部內(nèi)容,希望文章能夠幫你解決所遇到的問題。

如果覺得生活随笔網(wǎng)站內(nèi)容還不錯,歡迎將生活随笔推薦給好友。