PIXNET Logo登入

里歐's 布拉格

跳到主文

生活543

部落格全站分類:不設分類

  • 相簿
  • 部落格
  • 留言
  • 名片
  • 6月 15 週三 201117:49
  • [Cacti] MySQL for Cacti 相關指令

建立cacti資料庫
[root@localhost ~]#mysqladmin --user=root create cacti
刪除cacti資料庫
[root@localhost ~]#mysqladmin --user=root drop  cacti
(繼續閱讀...)
文章標籤

里歐 發表在 痞客邦 留言(0) 人氣(826)

  • 個人分類:MySQL
▲top
  • 3月 22 週二 201118: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:



mysqldump -d -h localhost -u root -pmypassword databasename > dumpfile.sql



The only option that is different than creating an entire backup is the -d switch, which tells mysqldump not to output the data.


Example:



mysqldump -d -h localhost -u root -p2Uad7as9 database01 > dumpfile.sql




(繼續閱讀...)
文章標籤

里歐 發表在 痞客邦 留言(0) 人氣(17)

  • 個人分類:MySQL
▲top
  • 3月 22 週二 201118: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:



mysqladmin -u root password “newpassword”


mysqladmin -u root -h host_name password “newpassword”



Example:



mysqladmin -u root password ws8dr8as3


mysqladmin -u root -h localhost password ws8dr8as3



You will also want to restart the database server after running this command



sudo /etc/init.d/mysql restart




(繼續閱讀...)
文章標籤

里歐 發表在 痞客邦 留言(0) 人氣(20)

  • 個人分類:MySQL
▲top
  • 3月 22 週二 201118: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



Here’s an example:



mysql -h localhost -u root -p72aDufi8 db01 < thedumpfile.sql




(繼續閱讀...)
文章標籤

里歐 發表在 痞客邦 留言(0) 人氣(24)

  • 個人分類:MySQL
▲top
  • 3月 22 週二 201118: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.



Syntax:



mysqldump -h localhost -u root -pmypassword databasename > dumpfile.sql



Example:



mysqldump -h localhost -u root -p2Uad7as9 database01 > dumpfile.sql



This will give you a text file containing all the commands required to recreate the database.



(繼續閱讀...)
文章標籤

里歐 發表在 痞客邦 留言(0) 人氣(20)

  • 個人分類:MySQL
▲top
  • 3月 08 週二 201120:10
  • 修復mysql資料庫

利用mysqlcheck命令快速修復mysql資料庫 
     因為掉電或者其他原因導致資料庫損壞,我們可以使用mysql本身的mysqlcheck命令來快速修復所有的資料庫或者特定的資料庫;
(繼續閱讀...)
文章標籤

里歐 發表在 痞客邦 留言(0) 人氣(93)

  • 個人分類:MySQL
▲top
  • 2月 21 週一 201121: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.
######################################
#!/bin/bash
# autopurgebinlog.sh
# script to purge mysql replication log-bin
# by am3n.net
# License GNU/GPL
(繼續閱讀...)
文章標籤

里歐 發表在 痞客邦 留言(0) 人氣(45)

  • 個人分類:MySQL
▲top
1

自訂側欄

自訂側欄

個人資訊

里歐
暱稱:
里歐
分類:
不設分類
好友:
累積中
地區:

熱門文章

  • (2,556)[Cacti] Cacti 錯誤訊息及排除方法
  • (1,098)如何將AD由win server 2003 升級至win server 2008
  • (284)正常移轉 FSMO 五大角色
  • (288)Enterasys A2 Switch Restore Configuration to factory defaults (Reset Password)
  • (10,644)[Linux][CentOS]設定 yum mirror 為台灣地區
  • (990)[Linux] Configuring the Softflowd NetFlow Exporter
  • (2,547)[Linux] 調整時區、系統時間、BIOS時間、同步系統時間 For Redhat
  • (1,344)Solaris 環境變數設定
  • (560)Exchange 2010 標準版及企業版差異功能
  • (603)Windows 2008 R2找KMS Server做產品啟動時,出現0xC004F074錯誤

文章分類

  • Mikrotik (0)
  • 理財 (0)
  • Cacti (1)
  • XenServer (1)
  • VMware (1)
  • 旅遊 & 飲食 (1)
  • Network (1)
  • Cisco (12)
  • Windows (6)
  • MySQL (7)
  • Solaris (18)
  • Symantec (6)
  • 文章 (3)
  • Acronis (0)
  • FortiGate (3)
  • Linux (48)
  • Microsoft (5)
  • 未分類文章 (1)

最新文章

  • Installation vsftpd-3.0.2 with xinetd on CentOS 6 .4 x86_64
  • MPLS QoS Example
  • 手動設定windows ntp client (w32tm & reg)
  • Installation Memcached On CentOS 6.3
  • Installation vsFTPd on CentOS
  • Solaris Command
  • Windows 2008 R2找KMS Server做產品啟動時,出現0xC004F074錯誤
  • Windows Update Server IP
  • CactiEZ 0.6 upgrade to Cacti 0.8.7i
  • Windows 2003 Server 關閉不必要的服務

動態訂閱

文章精選

文章搜尋

誰來我家

參觀人氣

  • 本日人氣:
  • 累積人氣: