<?xml version="1.0" encoding="UTF-8"?> <rss
version="2.0"
xmlns:content="http://purl.org/rss/1.0/modules/content/"
xmlns:wfw="http://wellformedweb.org/CommentAPI/"
xmlns:dc="http://purl.org/dc/elements/1.1/"
xmlns:atom="http://www.w3.org/2005/Atom"
xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
><channel><title>FAQforge &#187; MySQL</title> <atom:link href="http://www.faqforge.com/category/linux/server/mysql-server-linux/feed/" rel="self" type="application/rss+xml" /><link>http://www.faqforge.com</link> <description>Just another WordPress weblog</description> <lastBuildDate>Fri, 03 Feb 2012 13:47:23 +0000</lastBuildDate> <language>en</language> <sy:updatePeriod>hourly</sy:updatePeriod> <sy:updateFrequency>1</sy:updateFrequency> <generator>http://wordpress.org/?v=3.3.1</generator> <item><title>Solve the warning: connect to mysql server 127.0.0.1: Too many connections</title><link>http://www.faqforge.com/linux/controlpanels/solve-the-warning-connect-to-mysql-server-127-0-0-1-too-many-connections/</link> <comments>http://www.faqforge.com/linux/controlpanels/solve-the-warning-connect-to-mysql-server-127-0-0-1-too-many-connections/#comments</comments> <pubDate>Tue, 07 Sep 2010 19:06:55 +0000</pubDate> <dc:creator>Till</dc:creator> <category><![CDATA[Controlpanels]]></category> <category><![CDATA[Debian]]></category> <category><![CDATA[Distributions]]></category> <category><![CDATA[Email]]></category> <category><![CDATA[ISPConfig 3]]></category> <category><![CDATA[MySQL]]></category> <category><![CDATA[Server]]></category> <category><![CDATA[Ubuntu]]></category><guid
isPermaLink="false">http://www.faqforge.com/?p=512</guid> <description><![CDATA[If you get the error message &#8220;connect to mysql server 127.0.0.1: Too many connections&#8221; in a log file, e.g. the mail.log file, then the max. number of mysql database connections on your server is reached. To increase the max. number of simultanious connections, edit the MySQL my.cnf file: vi /etc/mysql/my.cnf and add or change the [...]]]></description> <content:encoded><![CDATA[<p>If you get the error message &#8220;connect to mysql server 127.0.0.1: Too many connections&#8221; in a log file, e.g. the mail.log file, then the max. number of mysql database connections on your server is reached. To increase the max. number of simultanious connections, edit the MySQL my.cnf file:</p><p
class="command">vi /etc/mysql/my.cnf</p><p>and add or change the lines for mysql max_connections and max_user_connections in the [mysqld] section of the my.cnf file:</p><p><span
class="system">[mysqld]<br
/> &#8230;&#8230;<br
/> max_connections        = 500<br
/> max_user_connections        = 500<br
/> &#8230;&#8230;.</span></p> ]]></content:encoded> <wfw:commentRss>http://www.faqforge.com/linux/controlpanels/solve-the-warning-connect-to-mysql-server-127-0-0-1-too-many-connections/feed/</wfw:commentRss> <slash:comments>1</slash:comments> </item> <item><title>Optimize MySQL performance with mysqltuner</title><link>http://www.faqforge.com/linux/optimize-mysql-performance-with-mysqltuner/</link> <comments>http://www.faqforge.com/linux/optimize-mysql-performance-with-mysqltuner/#comments</comments> <pubDate>Tue, 22 Dec 2009 10:30:04 +0000</pubDate> <dc:creator>Till</dc:creator> <category><![CDATA[Basics]]></category> <category><![CDATA[Debian]]></category> <category><![CDATA[Distributions]]></category> <category><![CDATA[Linux & Unix]]></category> <category><![CDATA[MySQL]]></category> <category><![CDATA[Server]]></category> <category><![CDATA[Ubuntu]]></category><guid
isPermaLink="false">http://www.faqforge.com/?p=348</guid> <description><![CDATA[The following tutorial describes the steps to optimize the performance of a MySQL database with the mysqltuner script. Login to your server on the shell, then execute the following commands: Download the mysqltuner script: cd /usr/local/bin wget http://mysqltuner.pl/mysqltuner.pl chmod +x mysqltuner.pl Run mysqltuner /usr/local/bin/mysqltuner.pl Then enter root as username and the mysql root password. You [...]]]></description> <content:encoded><![CDATA[<p>The following tutorial describes the steps to optimize the performance of a MySQL database with the mysqltuner script.</p><p>Login to your server on the shell, then execute the following commands:</p><p>Download the mysqltuner script:</p><p
class="command">cd /usr/local/bin<br
/> wget http://mysqltuner.pl/mysqltuner.pl<br
/> chmod +x mysqltuner.pl</p><p>Run mysqltuner</p><p
class="command">/usr/local/bin/mysqltuner.pl</p><p>Then enter root as username and the mysql root password.</p><p>You will get a output similar to this:</p><p
class="system">root@v221:/usr/local/bin# /usr/local/bin/mysqltuner.pl</p><p
class="system">&gt;&gt;  MySQLTuner 1.0.1 &#8211; Major Hayden &lt;major@mhtx.net&gt;<br
/> &gt;&gt;  Bug reports, feature requests, and downloads at http://mysqltuner.com/<br
/> &gt;&gt;  Run with &#8216;&#8211;help&#8217; for additional options and output filtering<br
/> Please enter your MySQL administrative login: root<br
/> Please enter your MySQL administrative password:</p><p
class="system">&#8212;&#8212;&#8211; General Statistics &#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8211;<br
/> [--] Skipped version check for MySQLTuner script<br
/> [OK] Currently running supported MySQL version 5.0.51a-24+lenny2<br
/> [!!] Switch to 64-bit OS &#8211; MySQL cannot currently use all of your RAM</p><p
class="system">&#8212;&#8212;&#8211; Storage Engine Statistics &#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br
/> [--] Status: +Archive -BDB -Federated +InnoDB -ISAM -NDBCluster<br
/> [--] Data in MyISAM tables: 26M (Tables: 215)<br
/> [!!] InnoDB is enabled but isn&#8217;t being used<br
/> [!!] Total fragmented tables: 33</p><p
class="system">&#8212;&#8212;&#8211; Performance Metrics &#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br
/> [--] Up for: 96d 23h 3m 41s (10M q [1.239 qps], 686K conn, TX: 701M, RX: 1B)<br
/> [--] Reads / Writes: 44% / 56%<br
/> [--] Total buffers: 58.0M global + 2.6M per thread (100 max threads)<br
/> [OK] Maximum possible memory usage: 320.5M (12% of installed RAM)<br
/> [OK] Slow queries: 0% (20/10M)<br
/> [OK] Highest usage of available connections: 33% (33/100)<br
/> [OK] Key buffer size / total MyISAM indexes: 16.0M/8.5M<br
/> [OK] Key buffer hit rate: 99.9% (57M cached / 30K reads)<br
/> [OK] Query cache efficiency: 78.6% (5M cached / 6M selects)<br
/> [!!] Query cache prunes per day: 483<br
/> [OK] Sorts requiring temporary tables: 0% (0 temp sorts / 408K sorts)<br
/> [!!] Temporary tables created on disk: 36% (269K on disk / 745K total)<br
/> [OK] Thread cache hit rate: 99% (427 created / 686K connections)<br
/> [!!] Table cache hit rate: 2% (64 open / 3K opened)<br
/> [OK] Open file limit used: 11% (120/1K)<br
/> [OK] Table locks acquired immediately: 99% (3M immediate / 3M locks)</p><p
class="system">&#8212;&#8212;&#8211; Recommendations &#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8211;<br
/> General recommendations:<br
/> Add skip-innodb to MySQL configuration to disable InnoDB<br
/> Run OPTIMIZE TABLE to defragment tables for better performance<br
/> Enable the slow query log to troubleshoot bad queries<br
/> When making adjustments, make tmp_table_size/max_heap_table_size equal<br
/> Reduce your SELECT DISTINCT queries without LIMIT clauses<br
/> Increase table_cache gradually to avoid file descriptor limits<br
/> Variables to adjust:<br
/> query_cache_size (&gt; 16M)<br
/> tmp_table_size (&gt; 32M)<br
/> max_heap_table_size (&gt; 16M)<br
/> table_cache (&gt; 64)</p><p>The script recommends to adjust or add the following variables in the mysql my.cnf file. The location of my.cnf is normally /etc/my.cnf or /etc/mysql/my.cnf depending on the Linux distribution that is installed on your server.</p><p>Open the my.cnf file:</p><p
class="command">vi /etc/mysql/my.cnf</p><p>and increase or set the variables in the [mysqld] section of the file. Mine looks now like this:</p><p
class="system">[mysqld]<br
/> #<br
/> # * Basic Settings<br
/> #<br
/> user            = mysql<br
/> pid-file        = /var/run/mysqld/mysqld.pid<br
/> socket          = /var/run/mysqld/mysqld.sock<br
/> port            = 3306<br
/> basedir         = /usr<br
/> datadir         = /var/lib/mysql<br
/> tmpdir          = /tmp<br
/> language        = /usr/share/mysql/english<br
/> skip-external-locking<br
/> #<br
/> # Instead of skip-networking the default is now to listen only on<br
/> # localhost which is more compatible and is not less secure.<br
/> bind-address            = 127.0.0.1<br
/> #<br
/> # * Fine Tuning<br
/> #<br
/> key_buffer              = 16M<br
/> max_allowed_packet      = 16M<br
/> thread_stack            = 128K<br
/> thread_cache_size       = 8<br
/> # This replaces the startup script and checks MyISAM tables if needed<br
/> # the first time they are touched<br
/> myisam-recover          = BACKUP<br
/> #max_connections        = 100<br
/> table_cache            = 128<br
/> #thread_concurrency     = 10<br
/> #<br
/> # * Query Cache Configuration<br
/> #<br
/> query_cache_limit       = 1M</p><p
class="system">query_cache_size        = 32M<br
/> tmp_table_sizee        = 64M<br
/> max_heap_table_sizee        = 32M</p><p>Then save the file and restart mysql. After a few hours, rerun mysqltuner and check again if the values are fine now or if the have to be increased to a higher value.</p> ]]></content:encoded> <wfw:commentRss>http://www.faqforge.com/linux/optimize-mysql-performance-with-mysqltuner/feed/</wfw:commentRss> <slash:comments>2</slash:comments> </item> <item><title>How to reset the administrator password in ISPConfig 3</title><link>http://www.faqforge.com/linux/controlpanels/ispconfig3/how-to-reset-the-administrator-password-in-ispconfig-3/</link> <comments>http://www.faqforge.com/linux/controlpanels/ispconfig3/how-to-reset-the-administrator-password-in-ispconfig-3/#comments</comments> <pubDate>Fri, 06 Nov 2009 19:53:18 +0000</pubDate> <dc:creator>Till</dc:creator> <category><![CDATA[ISPConfig 3]]></category> <category><![CDATA[MySQL]]></category><guid
isPermaLink="false">http://www.faqforge.com/?p=281</guid> <description><![CDATA[If you lost your ISPConfig 3 administrator password, you can reset it with the following SQL query. UPDATE sys_user SET passwort = md5(&#8216;admin&#8217;) WHERE username = &#8216;admin&#8217;; The SQL query sets the password to &#8220;admin&#8221; for the user &#8220;admin&#8221;, it has to be executed in the ISPConfig mysql database, e.g. with phpmyadmin. If you dont [...]]]></description> <content:encoded><![CDATA[<p>If you lost your ISPConfig 3 administrator password, you can reset it with the following SQL query.</p><p
class="command">UPDATE sys_user SET passwort = md5(&#8216;admin&#8217;) WHERE username = &#8216;admin&#8217;;</p><p>The SQL query sets the password to &#8220;admin&#8221; for the user &#8220;admin&#8221;, it has to be executed in the ISPConfig mysql database, e.g. with phpmyadmin. If you dont have phpmyadmin installed, then the query can be executed with the mysql commandline utility as well:</p><p>Login to the mysql database.</p><p
class="command">mysql -u root -p</p><p>and enter the password of the mysql root user. To switch to the ISPConfig database, run this command:</p><p
class="command">use dbispconfig;</p><p>Now execute the SQL command:</p><p
class="command">UPDATE sys_user SET passwort = md5(&#8216;admin&#8217;) WHERE username = &#8216;admin&#8217;;</p><p>and close the mysql shell:</p><p
class="command">quit;</p> ]]></content:encoded> <wfw:commentRss>http://www.faqforge.com/linux/controlpanels/ispconfig3/how-to-reset-the-administrator-password-in-ispconfig-3/feed/</wfw:commentRss> <slash:comments>13</slash:comments> </item> <item><title>How to reset the MySQL root password</title><link>http://www.faqforge.com/linux/controlpanels/ispconfig2/how-to-reset-the-mysql-root-password/</link> <comments>http://www.faqforge.com/linux/controlpanels/ispconfig2/how-to-reset-the-mysql-root-password/#comments</comments> <pubDate>Wed, 21 Oct 2009 09:32:31 +0000</pubDate> <dc:creator>Till</dc:creator> <category><![CDATA[Basics]]></category> <category><![CDATA[ISPConfig 2]]></category> <category><![CDATA[ISPConfig 3]]></category> <category><![CDATA[MySQL]]></category><guid
isPermaLink="false">http://www.faqforge.com/?p=248</guid> <description><![CDATA[The following steps describe the procedure to reset the mysql root password on Linux. 1) Stop the mysql server /etc/init.d/mysql stop 2) Start the mysql server manually without permission tables which allows us to login as root user without password: mysqld_safe &#8211;skip-grant-tables &#038; 3) Login into mysql as root user without a password and switch [...]]]></description> <content:encoded><![CDATA[<p>The following steps describe the procedure to reset the mysql root password on Linux.</p><p>1) Stop the mysql server</p><p
class="command">/etc/init.d/mysql stop</p><p>2) Start the mysql server manually without permission tables which allows us to login as root user without password:</p><p
class="command">mysqld_safe &#8211;skip-grant-tables &#038;</p><p>3) Login into mysql as root user without a password and switch to the &#8220;mysql&#8221; database:</p><p
class="command">mysql -u root mysql</p><p>Then execute this SQL query to set a new password for the mysql root user:</p><p
class="command">update user set Password=PASSWORD(&#8216;mynewpassword&#8217;) WHERE User=&#8217;root&#8217;;</p><p>(Replace &#8220;mynewpassword&#8221; with the new root password in the above command).</p><p>Then logout from the mysql prompt by typing:</p><p
class="command">exit</p><p>4) Now bring back the running mysql instance into the foreground by typing:</p><p
class="command">fg</p><p>and then press [ctrl] + c to kill the mysql process.</p><p>5) Start the mysql server again:</p><p
class="command">/etc/init.d/mysql start</p> ]]></content:encoded> <wfw:commentRss>http://www.faqforge.com/linux/controlpanels/ispconfig2/how-to-reset-the-mysql-root-password/feed/</wfw:commentRss> <slash:comments>2</slash:comments> </item> <item><title>How to enable the query log in MySQL</title><link>http://www.faqforge.com/linux/how-to-enable-the-query-log-in-mysql/</link> <comments>http://www.faqforge.com/linux/how-to-enable-the-query-log-in-mysql/#comments</comments> <pubDate>Wed, 30 Sep 2009 12:54:07 +0000</pubDate> <dc:creator>Till</dc:creator> <category><![CDATA[Debian]]></category> <category><![CDATA[Distributions]]></category> <category><![CDATA[Linux & Unix]]></category> <category><![CDATA[MySQL]]></category> <category><![CDATA[Ubuntu]]></category><guid
isPermaLink="false">http://www.faqforge.com/?p=220</guid> <description><![CDATA[To debug applications which use a mysql database, it comes in handy to enable the query log to get all SQL queries that were sent to the database.  Open the MySQL configuration file (my.cnf) vi /etc/mysql/my.cnf and add the line: log=/var/log/mysql.log in the [mysql] section of the file. Depending on the Linux distribution that you [...]]]></description> <content:encoded><![CDATA[<p>To debug applications which use a mysql database, it comes in handy to enable the query log to get all SQL queries that were sent to the database.  Open the MySQL configuration file (my.cnf)</p><p
class="command">vi /etc/mysql/my.cnf</p><p>and add the line:</p><p
class="command">log=/var/log/mysql.log</p><p>in the [mysql] section of the file. Depending on the Linux distribution that you use, the my.cnf file can be /etc/my.cnf or /etc/mysql/my.cnf.</p><p>Afterwards restart mysql to apply the new the configuration:</p><p
class="command">/etc/init.d/mysql restart</p> ]]></content:encoded> <wfw:commentRss>http://www.faqforge.com/linux/how-to-enable-the-query-log-in-mysql/feed/</wfw:commentRss> <slash:comments>2</slash:comments> </item> <item><title>Install postfix with MySQL support on CentOS 5.3 (64Bit)</title><link>http://www.faqforge.com/linux/install-postfix-with-mysql-support-on-centos-5-3-64bit/</link> <comments>http://www.faqforge.com/linux/install-postfix-with-mysql-support-on-centos-5-3-64bit/#comments</comments> <pubDate>Mon, 21 Sep 2009 13:14:59 +0000</pubDate> <dc:creator>Till</dc:creator> <category><![CDATA[Email]]></category> <category><![CDATA[ISPConfig 3]]></category> <category><![CDATA[Linux & Unix]]></category> <category><![CDATA[MySQL]]></category> <category><![CDATA[Server]]></category> <category><![CDATA[postfix]]></category><guid
isPermaLink="false">http://www.faqforge.com/?p=213</guid> <description><![CDATA[The following article explains the steps to compile postfix MTA with MySQL support on CentOS 5.3 as e.g. needed for ISPConfig 3. Remove the postfix package from CentOS which does not has MySQL support: /etc/init.d/postfix stop rpm -e &#8211;nodeps postfix Download the postfix source RPM and install it: cd /tmp wget http://mirror.rackspace.com/CentOS/5.3/os/SRPMS/postfix-2.3.3-2.1.el5_2.src.rpm rpm -i postfix-2.3.3-2.1.el5_2.src.rpm [...]]]></description> <content:encoded><![CDATA[<p>The following article explains the steps to compile postfix MTA with MySQL support on CentOS 5.3 as e.g. needed for ISPConfig 3.</p><p>Remove the postfix package from CentOS which does not has MySQL support:</p><p
class="command">/etc/init.d/postfix stop<br
/> rpm -e &#8211;nodeps postfix</p><p>Download the postfix source RPM and install it:</p><p
class="command">cd /tmp<br
/> wget http://mirror.rackspace.com/CentOS/5.3/os/SRPMS/postfix-2.3.3-2.1.el5_2.src.rpm<br
/> rpm -i postfix-2.3.3-2.1.el5_2.src.rpm</p><p>Edit the spec file to enable MySQL support.</p><p
class="command">vi /usr/src/redhat/SPECS/postfix.spec</p><p>and change the line:</p><p
class="system">%define MYSQL 0</p><p>to:</p><p
class="system">%define MYSQL 1</p><p>Install a few prerequisites before we build the new postfix RPM package</p><p
class="command">yum install pcre-devel mysql-devel</p><p>Build the postfix RPM with MySQL support:</p><p
class="command">rpmbuild -ba /usr/src/redhat/SPECS/postfix.spec</p><p>and install it.</p><p
class="command">cd /usr/src/redhat/RPMS/x86_64<br
/> rpm -i postfix-2.3.3-2.1.x86_64.rpm</p><p>Start postfix and configure it to be started at boot time:</p><p
class="command">/etc/init.d/postfix start<br
/> chkconfig &#8211;levels 235 postfix on</p> ]]></content:encoded> <wfw:commentRss>http://www.faqforge.com/linux/install-postfix-with-mysql-support-on-centos-5-3-64bit/feed/</wfw:commentRss> <slash:comments>4</slash:comments> </item> <item><title>Backup and restore mysql databases on the shell</title><link>http://www.faqforge.com/linux/distributions/debian/backup-and-restore-of-mysql-databases-on-the-shell/</link> <comments>http://www.faqforge.com/linux/distributions/debian/backup-and-restore-of-mysql-databases-on-the-shell/#comments</comments> <pubDate>Thu, 13 Aug 2009 15:17:56 +0000</pubDate> <dc:creator>admin</dc:creator> <category><![CDATA[Basics]]></category> <category><![CDATA[Debian]]></category> <category><![CDATA[MySQL]]></category> <category><![CDATA[Ubuntu]]></category> <category><![CDATA[Linux & Unix]]></category><guid
isPermaLink="false">http://www.faqforge.com/?p=147</guid> <description><![CDATA[One way to create a backup of a mysql database on the shell is to use the mysqldump command. Mysqldump creates a dump of the database in form of sql commands. Backup mysqldump -u root -p mydatabase &#62; /tmp/backup_mydatabase.sql This command creates a backup of the database with the name &#8220;mydatabase&#8221; in the file /tmp/backup_mydatabase.sql [...]]]></description> <content:encoded><![CDATA[<p>One way to create a backup of a mysql database on the shell is to use the mysqldump command. Mysqldump creates a dump of the database in form of sql commands.</p><p><strong>Backup</strong></p><p
class="command">mysqldump -u root -p mydatabase &gt; /tmp/backup_mydatabase.sql</p><p>This command creates a backup of the database with the name &#8220;mydatabase&#8221; in the file /tmp/backup_mydatabase.sql</p><p><strong>Restore</strong></p><p>To restore the backup, use the command:</p><p
class="command">mysql -u root -p mydatabase &lt; /tmp/backup_mydatabase.sql</p> ]]></content:encoded> <wfw:commentRss>http://www.faqforge.com/linux/distributions/debian/backup-and-restore-of-mysql-databases-on-the-shell/feed/</wfw:commentRss> <slash:comments>0</slash:comments> </item> </channel> </rss>
<!-- Performance optimized by W3 Total Cache. Learn more: http://www.w3-edge.com/wordpress-plugins/

Minified using disk: basic
Page Caching using disk: enhanced (User agent is rejected)
Database Caching 1/28 queries in 0.024 seconds using disk: basic
Object Caching 1122/1176 objects using disk: basic

Served from: www.faqforge.com @ 2012-02-05 00:33:15 -->
