<?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>Linux, Programming, Telephony, Asterisk, Apache, Tips &#38; Tricks &#187; Mysql</title>
	<atom:link href="http://shahidz.com/tag/mysql/feed/" rel="self" type="application/rss+xml" />
	<link>http://shahidz.com</link>
	<description>Passionate About Technology</description>
	<lastBuildDate>Sun, 10 Jan 2010 17:38:11 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.1</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>mysql-proxy: error while loading shared libraries: libmysql-proxy.so.0 or libmysql-chassis.so</title>
		<link>http://shahidz.com/mysql-proxy-error-while-loading-shared-libraries-libmysql-proxyso0-or-libmysql-chassisso/</link>
		<comments>http://shahidz.com/mysql-proxy-error-while-loading-shared-libraries-libmysql-proxyso0-or-libmysql-chassisso/#comments</comments>
		<pubDate>Fri, 01 Jan 2010 08:06:32 +0000</pubDate>
		<dc:creator>Shahid</dc:creator>
				<category><![CDATA[Mysql]]></category>
		<category><![CDATA[Add new tag]]></category>
		<category><![CDATA[error]]></category>
		<category><![CDATA[lua]]></category>
		<category><![CDATA[mysql-proxy]]></category>

		<guid isPermaLink="false">http://shahidz.com/?p=108</guid>
		<description><![CDATA[Getting the below errors:
$ ./agent/sbin/mysql-proxy -V
mysql-proxy: error while loading shared libraries: libmysql-chassis.so.0: cannot open shared object file: No such file or directory
mysql-proxy: error while loading shared libraries: libmysql-proxy.so.0: cannot open shared object file: No such file or directory
The error occurred because the mysql-proxy can&#8217;t find the library files needed for it. So copy the needed [...]]]></description>
			<content:encoded><![CDATA[<p>Getting the below errors:</p>
<pre>$ ./agent/sbin/mysql-proxy -V
mysql-proxy: error while loading shared libraries: libmysql-chassis.so.0: cannot open shared object file: No such file or directory
mysql-proxy: error while loading shared libraries: libmysql-proxy.so.0: cannot open shared object file: No such file or directory</pre>
<p>The error occurred because the mysql-proxy can&#8217;t find the library files needed for it. So copy the needed files to necessary directory.</p>
<pre> $ sudo cp /usr/local/lib/libmysql-* /usr/lib/i486-linux-gnu/
 $ mysql-proxy -V
  mysql-proxy 0.7.2
  glib2: 2.20.1
  libevent: 1.3e
  lua: Lua 5.1.4
    LUA_PATH: /usr/local/lib/mysql-proxy/lua/?.lua
    LUA_CPATH: /usr/local/lib/mysql-proxy/lua/?.so
  == plugins ==
  admin: 0.7.0
  proxy: 0.7.0
</pre>
<a class="a2a_dd addtoany_share_save" href="http://www.addtoany.com/share_save?linkurl=http%3A%2F%2Fshahidz.com%2Fmysql-proxy-error-while-loading-shared-libraries-libmysql-proxyso0-or-libmysql-chassisso%2F&amp;linkname=mysql-proxy%3A%20error%20while%20loading%20shared%20libraries%3A%20libmysql-proxy.so.0%20or%20libmysql-chassis.so"><img src="http://shahidz.com/wp-content/plugins/add-to-any/share_save_171_16.png" width="171" height="16" alt="Share/Bookmark"/></a>]]></content:encoded>
			<wfw:commentRss>http://shahidz.com/mysql-proxy-error-while-loading-shared-libraries-libmysql-proxyso0-or-libmysql-chassisso/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Setting Up the world Database (Countries, States, Cites, etc)</title>
		<link>http://shahidz.com/setting-up-the-world-database-countries-states-cites-etc/</link>
		<comments>http://shahidz.com/setting-up-the-world-database-countries-states-cites-etc/#comments</comments>
		<pubDate>Mon, 09 Feb 2009 06:04:19 +0000</pubDate>
		<dc:creator>Shahid</dc:creator>
				<category><![CDATA[Mysql]]></category>
		<category><![CDATA[]]></category>
		<category><![CDATA[cities]]></category>
		<category><![CDATA[countris]]></category>
		<category><![CDATA[district]]></category>
		<category><![CDATA[language]]></category>
		<category><![CDATA[population]]></category>
		<category><![CDATA[states]]></category>

		<guid isPermaLink="false">http://shahidz.com/setting-up-the-world-database-countries-states-cites-etc/</guid>
		<description><![CDATA[In certain applications we need the details of all the counties in the world, all the states in in each country and the capital of all the country.  And it is difficult to create all theses information&#8217;s manually. But mysql provide a file world.sql which contains sample data for a     world [...]]]></description>
			<content:encoded><![CDATA[<p>In certain applications we need the details of all the counties in the world, all the states in in each country and the capital of all the country.  And it is difficult to create all theses information&#8217;s manually. But mysql provide a file <font color="#800080"><code class="filename">world.sql</code></font> which contains sample data for a     <code class="literal">world</code> database that you can play with. This file contains names of all the Countries in the world, States, Cities, etc.  The file     is available for download from the mysql site <a href="http://dev.mysql.com/doc" target="_blank">http://dev.mysql.com/doc</a>. For more details about <font color="#800080">world.sql</font> visit the site <a href="http://dev.mysql.com/doc/world-setup/en/world-setup.html" target="_blank">http://dev.mysql.com/doc/world-setup/en/world-setup.html</a>.</p>
<p>To load the contents of the <code class="filename">world.sql</code> file into     MySQL, use the following procedure:</p>
<ol type="1">
<li>         Change directory to where the <code class="filename">world.sql</code>         file is locatedIf your current directory is not the same as the location of the         <code class="filename">world.sql</code> file, use a <span><strong class="command">cd</strong></span>         command to change location.</li>
<li>         Connect to the MySQL server using the <span><strong class="command">mysql</strong></span>         programAt your command-line prompt, issue this command:
<pre class="programlisting">shell&gt; <strong class="userinput"><code>mysql -u root</code></strong></pre>
<p>This command connects to the server using the MySQL         <code class="literal">root</code> account to make sure that you&#8217;ll have         permission to create the <code class="literal">world</code> database. The         <code class="option">--p</code> option tells <span><strong class="command">mysql</strong></span> to         prompt you for the <code class="literal">root</code> password. Enter the         password when prompted. (Remember that the MySQL         <code class="literal">root</code> account is not the same as the operating         system <code class="literal">root</code> account and probably will have a         different password.)</li>
</ol>
<ol type="1">
<li value="3">         Create the <code class="literal">world</code> database and select it as         the default database:In the <span><strong class="command">mysql</strong></span> program, issue the following         statements:
<pre class="programlisting">mysql&gt; <strong class="userinput"><code>CREATE DATABASE world;</code></strong>
mysql&gt; <strong class="userinput"><code>USE world</code></strong></pre>
</li>
<li>         Load the contents of <code class="filename">world.sql</code> into the         <code class="literal">world</code> databaseIssue a <code class="literal">SOURCE</code> command to tell         <span><strong class="command">mysql</strong></span> to read and process the contents of         <code class="filename">world.sql</code>:
<pre class="programlisting">mysql&gt; <strong class="userinput"><code>SOURCE world.sql</code></strong></pre>
<p>You&#8217;ll see quite a bit of output as <span><strong class="command">mysql</strong></span>         reads queries from the <code class="filename">world.sql</code> file and         executes them.</li>
</ol>
<p>After <span><strong class="command">mysql</strong></span> finishes processing the     <code class="filename">world.sql</code> file, try this statement:</p>
<pre class="programlisting">mysql&gt; <strong class="userinput"><code>SHOW TABLES;</code></strong>
+-----------————————--------------+
| Tables_in_world |
+-----------————————--------------+
| City            |
| Country         |
| CountryLanguage |
+-----------————————--------------+</pre>
<p class="itemizedlist">The <code class="literal">world</code> tables contain the following types of     information:</p>
<ul>
<li>         <code class="literal">Country</code>: Information about countries of the         world.</li>
<li>         <code class="literal">City</code>: Information about some of the cities in         those countries.</li>
<li>         <code class="literal">CountryLanguage</code>: Languages spoken in each         country.</li>
</ul>
<p>To see what columns each table contains, use     <code class="literal">DESCRIBE</code>. For example:</p>
<pre class="programlisting">mysql&gt; <strong class="userinput"><code>DESCRIBE Country;</code></strong>
mysql&gt; <strong class="userinput"><code>DESCRIBE City;</code></strong>
mysql&gt; <strong class="userinput"><code>DESCRIBE CountryLanguage</code></strong></pre>
<a class="a2a_dd addtoany_share_save" href="http://www.addtoany.com/share_save?linkurl=http%3A%2F%2Fshahidz.com%2Fsetting-up-the-world-database-countries-states-cites-etc%2F&amp;linkname=Setting%20Up%20the%20world%20Database%20%28Countries%2C%20States%2C%20Cites%2C%20etc%29"><img src="http://shahidz.com/wp-content/plugins/add-to-any/share_save_171_16.png" width="171" height="16" alt="Share/Bookmark"/></a>]]></content:encoded>
			<wfw:commentRss>http://shahidz.com/setting-up-the-world-database-countries-states-cites-etc/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>Logging into Mysql without Password</title>
		<link>http://shahidz.com/logging-into-mysql-without-password/</link>
		<comments>http://shahidz.com/logging-into-mysql-without-password/#comments</comments>
		<pubDate>Tue, 17 Jun 2008 07:26:02 +0000</pubDate>
		<dc:creator>Shahid</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[Mysql]]></category>
		<category><![CDATA[mysql password]]></category>
		<category><![CDATA[mysqld_safe]]></category>
		<category><![CDATA[password]]></category>
		<category><![CDATA[recovering mysql password]]></category>

		<guid isPermaLink="false">http://shahidz.com/logging-into-mysql-without-password/</guid>
		<description><![CDATA[Recovering MySQL Password and Permission Problems
If you garble your GRANT commands or forget passwords and find that you don&#8217;t have access to the critical mysql table even as the root user don&#8217;t panic. You can access MySQL without password. Superuser can access MySQL using  mysqld_safe command and you can change mysql password. Become the [...]]]></description>
			<content:encoded><![CDATA[<p><strong>Recovering MySQL Password and Permission Problems</strong></p>
<p>If you garble your GRANT commands or forget passwords and find that you don&#8217;t have access to the critical mysql table even as the root user don&#8217;t panic. You can access MySQL without password. Superuser can access MySQL using  <strong>mysqld_safe </strong>command and you can change mysql password. Become the superuser on the operating system (we&#8217;re talking now about the Unix root, not the MySQL root) and kill the MySQL process.</p>
<p><strong> Step : 1</strong></p>
<p>Stop MySQL server</p>
<pre>shahid@shahid:~$ sudo /etc/init.d/mysql stop
[sudo] password for shahid:
 * Stopping MySQL database server mysqld                                 [ OK ]
shahid@shahid:~$</pre>
<p><strong>Step : 2</strong></p>
<p>Make sure MySQL is was not running</p>
<pre>shahid@shahid:~$ ps aux | grep mysql
shahid   18751  0.0  0.0   3004   756 pts/5    S+   11:54   0:00 grep mysql
shahid@shahid:~$</pre>
<p><strong>Step : 3</strong></p>
<p>Start Mysql using mysqld_safe</p>
<pre>shahid@shahid:~$ sudo mysqld_safe --skip-grant-tables
nohup: ignoring input and redirecting stderr to stdout
Starting mysqld daemon with databases from /var/lib/mysql
mysqld_safe[19285]: started</pre>
<p><strong>Step : 4</strong></p>
<p>Make sure you can now get access to the <strong>mysql</strong> database:</p>
<pre>shahid@shahid:~$ mysql mysql
mysql&gt;</pre>
<p>Assign a password once again to the MySQL root user:</p>
<pre>mysql&gt; UPDATE mysql.user SET Password=PASSWORD('newpassword') WHERE User='root' AND Host='localhost';
Query OK, 1 row affected (0.00 sec)
Rows matched: 1  Changed: 1  Warnings: 0
mysql&gt; FLUSH PRIVILEGES;
Query OK, 0 rows affected (0.00 sec)
mysql&gt;</pre>
<p><strong>Step : 5</strong></p>
<p>Terminate the MySQL server and restart it in the usual way. Make any necessary changes to the privileges through GRANT commands, running mysql as the root user.</p>
<pre>shahid@shahid:~$ sudo /etc/init.d/mysql start
 * Starting MySQL database server mysqld                                 [ OK ]
 * Checking for corrupt, not cleanly closed and upgrade needing tables.
shahid@shahid:~$</pre>
<a class="a2a_dd addtoany_share_save" href="http://www.addtoany.com/share_save?linkurl=http%3A%2F%2Fshahidz.com%2Flogging-into-mysql-without-password%2F&amp;linkname=Logging%20into%20Mysql%20without%20Password"><img src="http://shahidz.com/wp-content/plugins/add-to-any/share_save_171_16.png" width="171" height="16" alt="Share/Bookmark"/></a>]]></content:encoded>
			<wfw:commentRss>http://shahidz.com/logging-into-mysql-without-password/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
	</channel>
</rss>
