<?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>ServerAdminBlog &#187; MySQL</title>
	<atom:link href="http://www.serveradminblog.com/category/mysql/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.serveradminblog.com</link>
	<description>Short Circuit...</description>
	<lastBuildDate>Mon, 06 Sep 2010 10:29:08 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0.1</generator>
		<item>
		<title>MySQL Workbench</title>
		<link>http://www.serveradminblog.com/2010/06/mysql-workbench/</link>
		<comments>http://www.serveradminblog.com/2010/06/mysql-workbench/#comments</comments>
		<pubDate>Wed, 16 Jun 2010 08:54:41 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[MySQL]]></category>
		<category><![CDATA[Other]]></category>

		<guid isPermaLink="false">http://www.serveradminblog.com/?p=113</guid>
		<description><![CDATA[MySQL Workbench is a cross-platform, visual database design tool developed by MySQL. It is the highly anticipated successor application of the DBDesigner4 project. MySQL Workbench will be available as a native GUI tool on Window, Linux and OS X. MySQL Workbench 5.2 RC provides: 1. Data Modeling 2. Query (upgrade from MySQL Query Browser) 3. [...]]]></description>
			<content:encoded><![CDATA[<p>MySQL Workbench is a cross-platform, visual database design tool developed by MySQL. It is the highly anticipated successor application of the DBDesigner4 project. MySQL Workbench will be available as a native GUI tool on Window, Linux and OS X. </p>
<p>MySQL Workbench 5.2 RC provides:<br />
   1. Data Modeling<br />
   2. Query (upgrade from MySQL Query Browser)<br />
   3. Admin (upgrade from MySQL Administrator)</p>
<p>Please get your copy from <a href="http://dev.mysql.com/downloads/workbench/" target="_blank">this page</a></p>
<p><img class="aligncenter" title="MySQL WB" src="http://i5.photobucket.com/albums/y157/mangia/ostalo/wb_diagam_fk_highlight1.png" alt="" width="319" height="250" /></p>
]]></content:encoded>
			<wfw:commentRss>http://www.serveradminblog.com/2010/06/mysql-workbench/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>HowTo recover MySQL root password</title>
		<link>http://www.serveradminblog.com/2010/04/howto-recover-mysql-root-password/</link>
		<comments>http://www.serveradminblog.com/2010/04/howto-recover-mysql-root-password/#comments</comments>
		<pubDate>Mon, 05 Apr 2010 16:53:17 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[MySQL]]></category>
		<category><![CDATA[Tips & Tricks]]></category>

		<guid isPermaLink="false">http://www.serveradminblog.com/?p=74</guid>
		<description><![CDATA[By default, MySQL Server will be installed with root superuser without any password. You can connect to MySQL server as root without requiring password or by keying in blank password. However, if you have set the password for root and forget or unable to recall the password, then you will need to reset the root [...]]]></description>
			<content:encoded><![CDATA[<p>By default, MySQL Server will be installed with root superuser without any password. You can connect to MySQL server as root without requiring password or by keying in blank password. However, if you have set the password for root and forget or unable to recall the password, then you will need to reset the root password for MySQL. </p>
<p>Step 1 is to stop MySQL service with</p>

<div class="wp_syntax"><div class="code"><pre class="text" style="font-family:monospace;"># /etc/init.d/mysql stop</pre></div></div>

<p>or</p>

<div class="wp_syntax"><div class="code"><pre class="text" style="font-family:monospace;"># service mysqld stop</pre></div></div>

<p>Step 2 is to start MySQL w/o root password</p>

<div class="wp_syntax"><div class="code"><pre class="text" style="font-family:monospace;"># mysqld_safe --skip-grant-tables &amp;</pre></div></div>

<p>Step 3 is to connect with mysql client </p>
<pre lan="text">
# mysql -u root
</pre>
<p>Step 4 is to finally change old root password with</p>

<div class="wp_syntax"><div class="code"><pre class="text" style="font-family:monospace;">mysql&gt; use mysql;
mysql&gt; update user set password=PASSWORD(&quot;NEW-ROOT-PASSWORD&quot;) where User='root';
mysql&gt; flush privileges;
mysql&gt; quit</pre></div></div>

<p>Step 5 is to stop mysql server and restart it without &#8211;skip-grant-tables parameter</p>

<div class="wp_syntax"><div class="code"><pre class="text" style="font-family:monospace;"># /etc/init.d/mysql stop</pre></div></div>

<p>Step 6 is to start mysql server and test it with</p>

<div class="wp_syntax"><div class="code"><pre class="text" style="font-family:monospace;"># /etc/init.d/mysql start
# mysql -u root -p</pre></div></div>

<p><strong>Note:</strong></p>
<p>After you install your new server, it is very good idea to improve the security of your MySQL installation with</p>

<div class="wp_syntax"><div class="code"><pre class="text" style="font-family:monospace;"># mysql_secure_installation</pre></div></div>

<p>With mysql_secure_installation wizard you can set a password for root account, you can remove root accounts that are accessible from outside the local host, you can remove anonymous-user accounts and you can remove the test database, which by default can be accessed by anonymous users. The script will prompt you to determine which actions to perform. </p>
]]></content:encoded>
			<wfw:commentRss>http://www.serveradminblog.com/2010/04/howto-recover-mysql-root-password/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>SysBench on CentOS &#8211; HowTo</title>
		<link>http://www.serveradminblog.com/2010/02/sysbench-on-centos-howto/</link>
		<comments>http://www.serveradminblog.com/2010/02/sysbench-on-centos-howto/#comments</comments>
		<pubDate>Fri, 26 Feb 2010 14:44:10 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Hardware]]></category>
		<category><![CDATA[MySQL]]></category>
		<category><![CDATA[Tips & Tricks]]></category>

		<guid isPermaLink="false">http://www.serveradminblog.com/?p=42</guid>
		<description><![CDATA[If you want to test server performance, you can think about SysBench. SysBench is a modular, cross-platform and multi-threaded benchmark tool for evaluating OS parameters that are important for a system running a database under intensive load. The idea of this benchmark suite is to quickly get an impression about system performance without setting up [...]]]></description>
			<content:encoded><![CDATA[<p>If you want to test server performance, you can think about SysBench. SysBench is a modular, cross-platform and multi-threaded benchmark tool for evaluating OS parameters that are important for a system running a database under intensive load. The idea of this benchmark suite is to quickly get an impression about system performance without setting up complex database benchmarks or even without installing a database at all. </p>
<p>Current features allow to test the following system parameters:</p>
<p>    * file I/O performance<br />
    * scheduler performance<br />
    * memory allocation and transfer speed<br />
    * POSIX threads implementation performance<br />
    * database server performance (OLTP benchmark)<br />
(Primarily written for MySQL server benchmarking, SysBench will be further extended to support multiple database backends, distributed benchmarks and third-party plug-in modules)</p>
<p>I couldn&#8217;t find CentOS RPM so here are few tips how to install it manually.</p>
<p>Download Sysbench (current version is 0.4.12)</p>

<div class="wp_syntax"><div class="code"><pre class="text" style="font-family:monospace;"># wget http://garr.dl.sourceforge.net/sourceforge/sysbench/sysbench-0.4.12.tar.gz</pre></div></div>

<p>Then unpack it and install with</p>

<div class="wp_syntax"><div class="code"><pre class="text" style="font-family:monospace;"># tar -xvzf sysbench-0.4.12.tar.gz
# cd sysbench-0.4.12
# libtoolize --force --copy 
# ./autogen.sh
# ./configure
# make
# make install</pre></div></div>

<p>To test CPU performance you can try</p>

<div class="wp_syntax"><div class="code"><pre class="text" style="font-family:monospace;"># sysbench --test=cpu --cpu-max-prime=20000 run</pre></div></div>

<p>For MySQL test, you&#8217;ll need to prepare database for testing with</p>

<div class="wp_syntax"><div class="code"><pre class="text" style="font-family:monospace;"># sysbench --test=oltp --mysql-table-engine=innodb --oltp-table-size=500000 --mysql-user=test_database --mysql-password=test_database_password --mysql-socket=/var/lib/mysql/mysql.sock prepare</pre></div></div>

<p>(replace test_database with valid username and test_database_password with valid password)</p>
<p>This command will create sample table inside test_database and it will have 500 000 rows (InnoDB engine).</p>

<div class="wp_syntax"><div class="code"><pre class="text" style="font-family:monospace;">sysbench 0.4.12:  multi-threaded system evaluation benchmark
&nbsp;
No DB drivers specified, using mysql
Creating table 'test-database'...
Creating 500000 records in table 'test-database'...</pre></div></div>

<p>Now to start read test</p>

<div class="wp_syntax"><div class="code"><pre class="text" style="font-family:monospace;"># sysbench --num-threads=16 --max-requests=100000 --test=oltp --oltp-table-size=500000 --mysql-socket=/var/lib/mysql/mysql.sock --oltp-read-only --mysql-user=test_database --mysql-password=test_database_password run</pre></div></div>

<p>For read-write test you can try</p>

<div class="wp_syntax"><div class="code"><pre class="text" style="font-family:monospace;"># sysbench --num-threads=16 --max-requests=10000 --test=oltp --oltp-table-size=500000 --mysql-socket=/var/lib/mysql/mysql.sock --oltp-test-mode=complex --mysql-user=test_database --mysql-password=test_database_password run</pre></div></div>

<p>More info about specific parameters can be found in official docs (<a href="http://sysbench.sourceforge.net/docs/">http://sysbench.sourceforge.net/docs/</a>)</p>
]]></content:encoded>
			<wfw:commentRss>http://www.serveradminblog.com/2010/02/sysbench-on-centos-howto/feed/</wfw:commentRss>
		<slash:comments>9</slash:comments>
		</item>
		<item>
		<title>Basic MySQL operations I</title>
		<link>http://www.serveradminblog.com/2009/03/basic-mysql-operations-i/</link>
		<comments>http://www.serveradminblog.com/2009/03/basic-mysql-operations-i/#comments</comments>
		<pubDate>Mon, 30 Mar 2009 23:49:46 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[MySQL]]></category>

		<guid isPermaLink="false">http://www.serveradminblog.com/?p=15</guid>
		<description><![CDATA[In this post, I will present few basic commands for MySQL administration. You&#8217;ll see how to create a database, create user, assign a database for specific user, etc. First I suppose that you have root password set and that you know it&#8230; (in next posts I will present few steps to set this password or [...]]]></description>
			<content:encoded><![CDATA[<p>In this post, I will present few basic commands for MySQL administration. You&#8217;ll see how to create a database, create user, assign a database for specific user, etc. First I suppose that you have root password set and that you know it&#8230; (in next posts I will present few steps to set this password or to recover it&#8230;)</p>
<p>Log in to mysql console:</p>

<div class="wp_syntax"><div class="code"><pre class="text" style="font-family:monospace;">&nbsp;
[root@hydra mysql]# mysql -u root -p
Enter password:
Welcome to the MySQL monitor.  Commands end with ; or \g.
Your MySQL connection id is 248
Server version: 5.0.45 Source distribution
&nbsp;
Type 'help;' or '\h' for help. Type '\c' to clear the buffer.
&nbsp;
mysql&gt;</pre></div></div>

<p>Here you can see server version (in this case 5.0.45). With next command you can see all databases</p>

<div class="wp_syntax"><div class="code"><pre class="text" style="font-family:monospace;">&nbsp;
mysql&gt; show databases;
+--------------------+
| Database           |
+--------------------+
| information_schema |
| birds              |
| mysql              |
| private             |
| bdd1             |
| test               |
+--------------------+
6 rows in set (0.05 sec)
&nbsp;
mysql&gt;</pre></div></div>

<p>If you want to create a new database, enter next command (remember that all SQL commands must be terminated with ; )</p>

<div class="wp_syntax"><div class="code"><pre class="text" style="font-family:monospace;">mysql&gt; create database db1;
Query OK, 1 row affected (0.00 sec)</pre></div></div>

<p>Now we need to assign a user to newly created database. Also, we need to grant him all privileges for this database but restrict access and operations on another databases (except test database)</p>

<div class="wp_syntax"><div class="code"><pre class="text" style="font-family:monospace;">mysql&gt; CREATE USER 'db1'@'localhost' IDENTIFIED BY 'db1pass';
Query OK, 0 rows affected (0.02 sec)
&nbsp;
mysql&gt; GRANT ALL PRIVILEGES ON db1.* TO 'db1'@'localhost' IDENTIFIED BY 'db1pass';
Query OK, 0 rows affected (0.01 sec)
&nbsp;
mysql&gt; quit;
Bye</pre></div></div>

<p>After this you can repeat step from the beginning and test new user account. In next posts I will present phpMyadmin</p>
]]></content:encoded>
			<wfw:commentRss>http://www.serveradminblog.com/2009/03/basic-mysql-operations-i/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
