mysql安裝


# ./configure --prefix=/usr/local/mysql --with-low-memory
# make
# make install
# groupadd mysql
# useradd -g mysql -s /bin/false -M mysql
# cp support-files/my-medium.cnf  /etc/my.cnf
# cd /usr/local/mysql
# ./bin/mysql_install_db --user=mysql
############################################    mysql_install_db     ##############################################
Installing MySQL system tables...
080921  4:38:14 [Warning] option 'max_join_size': unsigned value 18446744073709551615 adjusted to 4294967295
080921  4:38:14 [Warning] option 'max_join_size': unsigned value 18446744073709551615 adjusted to 4294967295
OK
Filling help tables...
080921  4:38:14 [Warning] option 'max_join_size': unsigned value 18446744073709551615 adjusted to 4294967295
080921  4:38:14 [Warning] option 'max_join_size': unsigned value 18446744073709551615 adjusted to 4294967295
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 localhost.localdomain password 'new-password'
Alternatively you can run:
/usr/local/mysql/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 /usr/local/mysql ; /usr/local/mysql/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 /usr/local/mysql/bin/mysqlbug script!
The latest information about MySQL is available on the web at
[url]http://www.mysql.com[/url]
Support MySQL by buying support/licenses at [url]http://shop.mysql.com[/url]
############################################         end          ##############################################
# chown -R root .
# chown -R mysql var
# chown -R mysql var/.
# chgrp -R mysql .
############################################         var          ##############################################
數據庫文件:權限mysql
錯誤日誌: /usr/local/mysql/var/*.err
############################################         end          ##############################################
# /usr/local/mysql/bin/mysqld_safe &
# cp ../src/mysql-5.0.67/support-files/mysql.server /etc/rc.d/init.d/mysqld
# chmod 700 /etc/rc.d/init.d/mysqld
# chkconfig --add mysqld
# chkconfig --level 345 mysqld on
############################################         init.d         ##############################################
# chkconfig --add mysqld
# chkconfig --level 345 mysqld on                               這兩條命令前  # /etc/init.d/中沒有mysqld
############################################         end          ##############################################
配置庫文件搜索路徑
# echo "/usr/local/mysql/lib/mysql" >> /etc/ld.so.conf
# ldconfig -v
################################################################################################################
添加/usr/local/mysql/bin到環境變量PATH中
# export PATH=$PATH:/usr/local/mysql/bin                            mysqladmin、mysql等命令可以直接執行.重啓後後失效
################################################################################################################
永久修改
vi ,bashrc
export PATH=$PATH:/usr/local/mysql/bin
立即生效
source .bashrc
################################################################################################################
# mysqladmin -u root password 123456
080921  4:38:14 [Warning] option 'max_join_size': unsigned value 18446744073709551615 adjusted to 4294967295
080921  4:38:14 [Warning] option 'max_join_size': unsigned value 18446744073709551615 adjusted to 4294967295
OK
Filling help tables...
080921  4:38:14 [Warning] option 'max_join_size': unsigned value 18446744073709551615 adjusted to 4294967295
080921  4:38:14 [Warning] option 'max_join_size': unsigned value 18446744073709551615 adjusted to 4294967295
OK
還是不知道
080921  4:38:14 [Warning] option 'max_join_size': unsigned value 18446744073709551615 adjusted to 4294967295
080921  4:38:14 [Warning] option 'max_join_size': unsigned value 18446744073709551615 adjusted to 4294967295
OK
Filling help tables...
080921  4:38:14 [Warning] option 'max_join_size': unsigned value 18446744073709551615 adjusted to 4294967295
080921  4:38:14 [Warning] option 'max_join_size': unsigned value 18446744073709551615 adjusted to 4294967295
OK
是哪裏錯了 ,就先這樣吧
發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章