solaris下mysql的安裝:
1.solaris下的mysql目錄:
/usr/sfw/sbin:守護程序mysqld,mysqld_safe
/usr/sfw/bin:管理工具mysqladmin,mysqlcheck等
/usr/sfw/share/mysql/:配置檔案 my-medium.cnf等
2.配置mysql配置檔案
-bash-3.00#cp /usr/sfw/share/mysql/my-medium.cnf /etc/my.cnf
-bash-3.00#vi /etc/my.cnf
# the following options will be passed to all mysql clients
[client]
#password = your_password
port = 3306
##modified content [email protected]
#socket = /var/lib/mysql/mysql.sock
socket = /home/mysql/5.0/mysql/mysql.sock
# here follows entries for some specific programs
# the mysql server
[mysqld]
port = 3306
#socket = /var/lib/mysql/mysql.sock
##modified content [email protected]
socket = /home/mysql/5.0/mysql/mysql.sock
skip-locking
key_buffer = 16m
max_allowed_packet = 1m
table_cache = 64
sort_buffer_size = 512k
net_buffer_length = 8k
read_buffer_size = 256k
read_rnd_buffer_size = 512k
myisam_sort_buffer_size = 8m
3.建立mysql使用者
-bash-3.00#useradd -u 1002 mysql
-bash-3.00#groupadd -g 1002 mysql mysql
-bash-3.00#mkdir /export/home/mysql
4.啟動mysql
-bash-3.00#./mysqld &
發生如下錯誤:
080424 15:45:53 innodb: started
080424 15:45:53 fatal error: can't open privilege tables: table 'mysql.host' doesn't exist
080424 15:45:53 aborting
解決方法:
rm -rf /pathtodatadir
then
cd /usr/local/mysql1/bin
./mysql_install_db --user=mysql --ldata=/var/mysql
./mysqld_safe --datadir=/var/mysql --user=mysql &
5.安裝成功
備份:[root@mt src]#mysqldump -u root -p --opt mysql > mysql_back
恢復:[root@mt src]#mysql -u root -p mysql < mysql_back
Solaris10下mysql的pkg安裝方法
花了一晚上才把apache php mysql在solaris上面搞定,而mysql的安裝的確是很容易出問題!順帶記錄一下在mysql配置過程中可能會用到的重要東西 通過直接修改授權表設定使用者許可權 shell mysql user root mysql mysql insert into use...
Solaris下更改IP位址
solaris下更改ip位址 1 ifconfig命令暫時修改 ifconfig用來配置網絡卡的ip位址,改動後即生效,但並不儲存,下次啟動後失效。ifconfig a 得出網絡卡的名字,一般第一塊100m網絡卡名為 hme0 ifconfig hme0 down 先把網絡卡hme0的服務暫時停止 ...
Linux Centos7 下Mysql的安裝
root bogon whereis mysql mysql usr bin mysql usr lib mysql usr share mysql usr share man man1 mysql.1.gz root bogon rpm qa grep mysql mysql community ...