- 這是一篇限定共同作者觀看的文章。
若您是共同作者,登入後即可閱讀。
目前分類:MySQL (8)
- Jan 13 Fri 2012 18:08
MySQL Tuning
- Jun 15 Wed 2011 17:49
[Cacti] MySQL for Cacti 相關指令
建立cacti資料庫
[root@localhost ~]#mysqladmin --user=root create cacti
- Mar 22 Tue 2011 18:19
Dump just the table structure to a file in MySQL
For this exercise, we will use the mysqldump utility the same as if we were
Syntax:
- Mar 22 Tue 2011 18:18
Change or Set the MySQL Root password
For every database, you should set the root or sa passwords to something other than the default, unless you want to get hacked. For mysql, the system administrator user is called root. You will use the mysqladmin utility from a command line to set the new password. Notice that there are two commands to be run.
Syntax:
- Mar 22 Tue 2011 18:16
Restore MySQL database from a backup file
There are many reasons you would want to restore a database from a backup file… But you should also test this on a test server just to make sure that your database backups are working correctly. Here’s the syntax:
mysql -h hostname -u username -pthepassword databasename < dumpfile.sql
- Mar 22 Tue 2011 18:15
Backup MySQL Database to a file
Backing up your database is a very important system administration task, and should generally be run from a cron job at scheduled intervals. We will use the mysqldump utility included with mysql to dump the contents of the database to a text file that can be easily re-imported.
- Mar 08 Tue 2011 20:10
修復mysql資料庫
利用mysqlcheck命令快速修復mysql資料庫
因為掉電或者其他原因導致資料庫損壞,我們可以使用mysql本身的mysqlcheck命令來快速修復所有的資料庫或者特定的資料庫;
- Feb 21 Mon 2011 21:10
Automatically Purge MySQL Master Log
Automatically Purge MySQL Master Log
My Friend Andre Hartawan is troubling due to his mysql server at work stop operating. After quick check he found that no more disk space available on the system. Further check on /var partition he found many replication log file on disk which no longer needed but have big size (100MB). He can easily purge the logs file but wanted the server due it chores automatically. So here it’s I share my script (autopurgebinlog.sh) to purge replication logbin automatically.