網(wǎng)友評分:
5分
E8財(cái)務(wù)管理軟件專業(yè)版 V8.25 官方版
天翼視聯(lián)電腦版(原天翼云眼電腦版) V2.7.3.2 官方最新版
蘇州新公積金網(wǎng)上申報(bào)繳費(fèi)系統(tǒng) V15.0 官方最新版
黑科技工具箱 1.2 綠色免費(fèi)版
SINAMICS Startdrive Advanced V16.0 官方版
江西省網(wǎng)上稅務(wù)局辦稅工具包 V1.0 官方版
E8票據(jù)打印軟件 V10.2 官方版
E8客戶管理軟件 V10.25 官方最新版
mysql for linux是一款功能十分強(qiáng)大的數(shù)據(jù)庫管理軟件,該軟件專門針對使用linux操作系統(tǒng)的用戶量身定制,支持跨平臺使用,提供了豐富的數(shù)據(jù)庫編輯接口,為建立基于數(shù)據(jù)庫的動(dòng)態(tài)網(wǎng)站提供了強(qiáng)大動(dòng)力,滿足用戶的數(shù)據(jù)庫管理需求,提高用戶的工作效率,喜歡的小伙伴千萬不要錯(cuò)過哦。
1.使用C和C++編寫,并使用了多種編譯器進(jìn)行測試,保證源代碼的可移植性。
2.支持AIX、FreeBSD、HP-UX、Linux、Mac OS、NovellNetware、OpenBSD、OS/2 Wrap、Solaris、Windows等多種操作系統(tǒng)。
3.為多種編程語言提供了API。這些編程語言包括C、C++、Python、Java、Perl、PHP、Eiffel、Ruby和Tcl等。
4.支持多線程,充分利用CPU資源。
5.優(yōu)化的SQL查詢算法,有效地提高查詢速度。
6.既能夠作為一個(gè)單獨(dú)的應(yīng)用程序應(yīng)用在客戶端服務(wù)器網(wǎng)絡(luò)環(huán)境中,也能夠作為一個(gè)庫而嵌入到其他的軟件中。
7.提供多語言支持,常見的編碼如中文的GB 2312、BIG5,日文的Shift_JIS等都可以用作數(shù)據(jù)表名和數(shù)據(jù)列名。
8.提供TCP/IP、ODBC和JDBC等多種數(shù)據(jù)庫連接途徑。
9.提供用于管理、檢查、優(yōu)化數(shù)據(jù)庫操作的管理工具。
10.支持大型的數(shù)據(jù)庫??梢蕴幚頁碛猩锨f條記錄的大型數(shù)據(jù)庫。
11.支持多種存儲引擎。
12.Mysql是開源的,所以你不需要支付額外的費(fèi)用。
13.MySQL使用標(biāo)準(zhǔn)的SQL數(shù)據(jù)語言形式。
14.Mysql對PHP有很好的支持,PHP是目前最流行的Web開發(fā)語言。
15.Mysql是可以定制的,采用了GPL協(xié)議,你可以修改源碼來開發(fā)自己的Mysql系統(tǒng)。
安裝源代碼版本的MySQL(mysql-5.1.40-linux-i686-glibc23.tar.gz安裝筆記)
1.首先添加mysql用戶組
shell> groupadd mysql
2.添加mysql用戶,并指定到mysql用戶組
shell> useradd -g mysql mysql
3.解壓縮mysql-version.tar.gz
shell> gunzip < mysql-VERSION.tar.gz | tar -xvf -
4.安裝mysql
shell> cd mysql-VERSION
shell> ./configure --prefix=/usr/local/mysql --with-charset=gbk --with-extra-charsets=armscii8,ascii,big5,cp1250,cp1251,cp1256,cp1257,cp850,cp852,cp866,cp932,dec8,eucjpms,euckr,gb2312,gbk,geostd8,greek,hebrew,hp8,keybcs2,koi8r,koi8u,latin1,latin2,latin5,latin7,macce,macroman,sjis,swe7,tis620,ucs2,ujis,utf8 --with-plugins=innodb_plugin
shell> make
shell> make install
5.復(fù)制配置文件
shell> cp support-files/my-medium.cnf /etc/my.cnf
6.執(zhí)行mysql系統(tǒng)數(shù)據(jù)庫初始化腳本
shell> cd /usr/local/mysql
shell> bin/mysql_install_db --user=mysql
7.設(shè)定mysql安裝目錄權(quán)限,設(shè)置owner為mysql
shell> chown -R mysql var
shell> chgrp -R mysql .
8.啟動(dòng)mysql應(yīng)用
shell> /usr/local/mysql/bin/mysqld_safe --user=mysql &
9.設(shè)置root密碼(數(shù)據(jù)庫的DBA)
shell> bin/mysqladmin -u root password ‘123456’
10.登錄mysql
shell> bin/mysql -u root -p
Enter password:
登錄成功會(huì)看到:
這時(shí)mysql已經(jīng)裝好了,可以查看數(shù)據(jù)庫了,但在正式使用數(shù)據(jù)庫開發(fā)與部署的時(shí)候還需要做一些工作:
1.設(shè)定配置文件my.cnf
按照需求copy my-***.cnf到/etc/my.cnf
2.修改默認(rèn)字符集utf8
(1).[client]下加入default-character-set=utf8
(2).[mysqld]下加入default-character-set=utf8
#不改動(dòng)存儲引擎的話,3、4步可以略過
3.啟動(dòng)InnoDB引擎的方法如下:
1)關(guān)閉mysql的服務(wù)
2)修改my.ini
將default-storage-engine=INNODB前的注釋(#)去掉
將skip-innodb這行注釋(加上#)
4.配置innodb參數(shù)
1).找到# Uncomment the following if you are using InnoDB tables
去掉innodb_*下的所有#
2).如果安裝mysql的目錄不是默認(rèn)的,則需要修改
# mysql 默認(rèn)安裝目錄為 /usr/local/mysql/
# mysql 默認(rèn)表空間目錄安裝目錄為 /usr/local/mysql/var/
innodb_data_home_dir=/usr/local/database/mysql/var/
innodb_log_group_home_dir=/usr/local/database/mysql/var/
3).保存后重啟mysql服務(wù)。
5.設(shè)置系統(tǒng)服務(wù)
讓linux啟動(dòng)的時(shí)候就啟動(dòng)mysql服務(wù)
shell> cd /usr/local/mysql/
shell> cp support-files/mysql.server /etc/init.d/mysql
shell> chmod 777 /etc/init.d/mysql
shell> chkconfig --add mysql
shell> chkconfig --level 35 mysql on
6.重啟MySQL服務(wù)
shell> service mysql restart
備注:
Add a login user and group for ‘mysqld’ to run as:為‘mysqld’增添一個(gè)登陸用戶和組
shell> groupadd mysql
shell> useradd -g mysql mysql
Configure the release and compile everything:配置和編譯
shell> ./configure --prefix=/usr/local/mysql
--prefix后面指示了默認(rèn)安裝路徑
shell> make
如果還想知道更詳細(xì)的configure命令,請查閱manual for configure
If you want to set up an option file, use one of those present in
the ‘support-files’ directory as a template. For example:如果你想安裝選項(xiàng)文件,使用當(dāng)前存在的‘support-files’ 文件夾下的作為模板,例如:
shell> cp support-files/my-medium.cnf /etc/my.cnf
If you haven`t installed MySQL before, you must create the MySQL
grant tables:如果你以前沒有安裝過MySQL,你必須創(chuàng)建一個(gè)MySQL準(zhǔn)許的表
shell> bin/mysql_install_db --user=mysql
Change the ownership of program binaries to ‘root’ and ownership
of the data directory to the user that you will run ‘mysqld’ as.
Assuming that you are located in the installation directory
(‘/usr/local/mysql’), the commands look like this:將程序的所有權(quán)限給‘root’ ,并且把數(shù)據(jù)目錄的所有權(quán)給可以運(yùn)行‘mysqld’的用戶。假設(shè)MySQL的安裝目錄是(‘/usr/local/mysql’),命令如下所示:
shell> chown -R mysql var
shell> chgrp -R mysql .
The first command changes the owner attribute of the files to the ‘root’ user. 第一行命令把文件擁有權(quán)給‘root’。The second changes the owner attribute of the data directory to the ‘mysql’ user. 第二行把數(shù)據(jù)目錄擁護(hù)權(quán)給‘mysql’用戶。The third changes the group attribute to the ‘mysql’ group.第三行把組的權(quán)限給‘mysql’組。
After everything has been installed, you should initialize and test your distribution using this command:萬事具備后,你就可以按照下面的命令測試并運(yùn)行你的MySQL了:
shell> /usr/local/mysql/bin/mysqld_safe --user=mysql &
注意:文件中的單引號全應(yīng)該是英文狀態(tài)下輸入的,這里小編為了美觀改成中文狀態(tài)下輸入的單引號了。
標(biāo)簽: mysql for linux 數(shù)據(jù)庫管理
關(guān)于本站|下載幫助|下載聲明|軟件發(fā)布|聯(lián)系我們
Copyright ? 2005-2024 daaijiaoyu.cn.All rights reserved.
浙ICP備2024132706號-1 浙公網(wǎng)安備33038102330474號