how to backup .sql dump to mysql database
How to backup mysql database
Backup dbname to dbname_backup.sql
joec@ubuntu~:$ mysqldump -u root -p dbname > /home/joec/dbname_backup.sql
先開一個新的Database
joec@ubuntu~:$ mysql -u root -p
mysql> create database dbname;
mysql> quit
Bye
joec@ubuntu~:$ ls
db_backup.sql
joec@ubuntu~:$ mysql -u root -p -h 192.168.1.8 dbname < db_backup.sql
2008年9月2日 星期二
如何在MySQL開/刪帳號
刪帳號
使用mysql資料庫因為user table在裏面
mysql> use mysql
依照IP刪帳號
Delete a MySQL user account from IP address 192.168.1.8
mysql> delete from user where host = '192.168.1.8';
創立 drupal 資料庫
mysql> create database drupal;
開帳號給 bob 使用者
IP 位置 192.168.1.8
密碼是: EnteRp@ssw0rdHere
資料庫是: drupal
Table是: drupal.*
mysql> grant all on drupal.* TO bob@192.168.1.8 IDENTIFIED BY 'EnteRp@ssw0rdHere';
Query OK, 0 rows affected (0.00 sec)
使用mysql資料庫因為user table在裏面
mysql> use mysql
依照IP刪帳號
Delete a MySQL user account from IP address 192.168.1.8
mysql> delete from user where host = '192.168.1.8';
創立 drupal 資料庫
mysql> create database drupal;
開帳號給 bob 使用者
IP 位置 192.168.1.8
密碼是: EnteRp@ssw0rdHere
資料庫是: drupal
Table是: drupal.*
mysql> grant all on drupal.* TO bob@192.168.1.8 IDENTIFIED BY 'EnteRp@ssw0rdHere';
Query OK, 0 rows affected (0.00 sec)
2008年1月25日 星期五
如何在Linux, Ubuntu, Debian下安裝 LAMP Apache 2.2, MySQL 5, PHP 4, SSH
How To install LAMP Apacle MySQL PHP SSH On Ubuntu 7.10 Gusty Gibbon
如何在linux, ubuntu, debian下安裝 apache, mysql, php, ssh
ubuntu apache2 + php5 + mysql5
1. ssh server for remote access
sudo apt-get install ssh
2. database server
sudo apt-get install mysql-server
3. apache http server
sudo apt-get install apache2
4. php for apache http server
sudo apt-get install php5
5. mysql for apache http server
sudo apt-get install libapache2-mod-auth-mysql
sudo apt-get install php5-mysql
remember! reboot your computer afterward!
如何啟動,停止,重新啟動 Mysql, Apache
start, restart, stop apache
sudo /etc/init.d/apache2 restart
start, restart, stop mysql
sudo /etc/init.d/mysql restart
如何在linux, ubuntu, debian下安裝 apache, mysql, php, ssh
ubuntu apache2 + php5 + mysql5
1. ssh server for remote access
sudo apt-get install ssh
2. database server
sudo apt-get install mysql-server
3. apache http server
sudo apt-get install apache2
4. php for apache http server
sudo apt-get install php5
5. mysql for apache http server
sudo apt-get install libapache2-mod-auth-mysql
sudo apt-get install php5-mysql
remember! reboot your computer afterward!
如何啟動,停止,重新啟動 Mysql, Apache
start, restart, stop apache
sudo /etc/init.d/apache2 restart
start, restart, stop mysql
sudo /etc/init.d/mysql restart
訂閱:
文章 (Atom)