<rdf:RDF
    xmlns:rdf='http://www.w3.org/1999/02/22-rdf-syntax-ns#'
    xmlns:s='http://snipsnap.org/rdf/snip-schema#'
    xml:base='http://bliki.rimuhosting.com/rdf'>
    <s:Snip rdf:about='http://bliki.rimuhosting.com/rdf#knowledgebase/linux/miscapplications/mysql+notes'
         s:cUser='retep'
         s:oUser=''
         s:mUser='john'>
        <s:name>knowledgebase/linux/miscapplications/mysql notes</s:name>
        <s:content>1 Resolving: Access denied for user: &apos;root@localhost.localdomain&apos;&#xD;&#xA;&#xD;&#xA;If you connect to MySQL like this: mysql -u root -p -h 127.0.0.1 and get and error like:&#xD;&#xA;&#xD;&#xA;{code}&#xD;&#xA;ERROR 1045: Access denied for user: &apos;root@localhost.localdomain&apos; (Using password: YES)&#xD;&#xA;{code}&#xD;&#xA;&#xD;&#xA;...then MySQL is probably picking up the wrong hostname from /etc/hosts.  See if there is a line like: 127.0.0.1 localhost.localdomain localhost and change it to simply 127.0.0.1 localhost.&#xD;&#xA;&#xD;&#xA;1 Resolving: [ERROR] bdb: unable to initialize mutex: Function not implemented.&#xD;&#xA;&#xD;&#xA;You may see this on Debian systems upgrading to MySQL 4.1.  It results from your server not having the Berkely database library files necessary to support that table type in MySQL.  The BDB table type is not that common.  So you can just skip support for it.  Add a skip-bdb line to your my.cnf file (/etc/mysql/my.cnf on Debian and /etc/my.cnf on RedHat boxes).&#xD;&#xA;&#xD;&#xA;1 Resolving: &apos;Client does not support authentication protocol requested by server&apos;&#xD;&#xA;&#xD;&#xA;If you get an error about client authentication version when connecting to MySQL then it may be because your server is using the new password format, while your mysql client (or PHP script, or JDBC code) is using the old password format.  See: http://dev.mysql.com/doc/mysql/en/Application_password_use.html.&#xD;&#xA;&#xD;&#xA;You can change a new password to an old password like this:&#xD;&#xA;&#xD;&#xA;{code}&#xD;&#xA;mysql&gt; update user set password = old_password(&apos;passwordhere&apos;) where user = &apos;phpbb&apos;; flush privileges;&#xD;&#xA;Query OK, 1 row affected (0.04 sec)&#xD;&#xA;Rows matched: 1  Changed: 1  Warnings: 0&#xD;&#xA;&#xD;&#xA;mysql&gt; select user, password from user;&#xD;&#xA;+-------+-------------------------------------------+&#xD;&#xA;| user  | password                                  |&#xD;&#xA;+-------+-------------------------------------------+&#xD;&#xA;| root  | *BA3E2F47E409A6ABA83D219D70631A02FE28539E |&#xD;&#xA;| root  | *BA3E2F47E409A6ABA83D219D70631A02FE28539E |&#xD;&#xA;|       |                                           |&#xD;&#xA;|       |                                           |&#xD;&#xA;| phpbb | 09a6e3834c6d11c9                          |&#xD;&#xA;+-------+-------------------------------------------+&#xD;&#xA;5 rows in set (0.00 sec)&#xD;&#xA;&#xD;&#xA;{code}&#xD;&#xA;&#xD;&#xA;In this case root has a new, longer password.  While the phpbb user has the shorter, old password format.  In PHP something like mysql_connect(&apos;localhost&apos;, &apos;phpbb&apos;, &apos;passwordhere&apos;) should now successfully create a connection.&#xD;&#xA;&#xD;&#xA;1 Forgot your MySQL Password?&#xD;&#xA;&#xD;&#xA;We all forget passwords at some point.  Fortunately you can reset your MySQL password if you forget it.&#xD;&#xA;&#xD;&#xA;Add a &quot;skip-grant-tables&quot; line to /etc/my.cnf under the [mysqld] section.&#xD;&#xA;&#xD;&#xA;Restart MySQL:&#xD;&#xA;/etc/init.d/mysql* restart&#xD;&#xA;&#xD;&#xA;Set your password to what you like:&#xD;&#xA;mysql -e &quot;update user set password = old_password(&apos;newpassword&apos;) where user = &apos;root&apos;&quot; mysql&#xD;&#xA;&#xD;&#xA;Remove the skip-grant-tables option from /etc/my.cnf.&#xD;&#xA;&#xD;&#xA;Restart MySQL:&#xD;&#xA;/etc/init.d/mysql* restart&#xD;&#xA;&#xD;&#xA;On Debian Etch, there is a good howto to reset your root password here:&#xD;&#xA;&#xD;&#xA;http://www.debianadmin.com/recover-mysql-database-root-password.html&#xD;&#xA;&#xD;&#xA;1 MySQL Not Listening On A Public IP&#xD;&#xA;&#xD;&#xA;By default, MySQL (on Debian) doesn&apos;t listen on the public interface:&#xD;&#xA;&#xD;&#xA;{code}&#xD;&#xA;#netstat -l&#xD;&#xA;tcp        0      0 127.0.0.1:3306          0.0.0.0:*&#xD;&#xA;LISTEN     1768/mysqld&#xD;&#xA;{code}&#xD;&#xA;&#xD;&#xA;In /etc/mysql/my.cnf, comment out the bind line:&#xD;&#xA;&#xD;&#xA;{code}&#xD;&#xA;#bind-address           = 127.0.0.1&#xD;&#xA;{code}&#xD;&#xA;&#xD;&#xA;And restart MySQL. Then it will listen on the public interface, and you&#xD;&#xA;should be able to connect.&#xD;&#xA;&#xD;&#xA;{code}&#xD;&#xA;#netstat -l&#xD;&#xA;tcp        0      0 0.0.0.0:3306            0.0.0.0:*&#xD;&#xA;LISTEN     14134/mysqld&#xD;&#xA;{code}&#xD;&#xA;&#xD;&#xA;1 MySQL optimization links:&#xD;&#xA;Several times I&apos;ve had the following issue: the mysqld is the bottleneck, but there&apos;s plenty of free memory.  How to make it use more memory for cache? Here&apos;s some links:&#xD;&#xA;http://www.databasejournal.com/features/php/article.php/10898_3110171_1&#xD;&#xA;http://www.day32.com/MySQL/&#xD;&#xA;http://drupal.org/node/85768</s:content>
        <s:mTime>2008-03-05 19:32:38.0</s:mTime>
        <s:cTime>2006-03-25 17:46:33.0</s:cTime>
        <s:comments
             rdf:type='http://www.w3.org/1999/02/22-rdf-syntax-ns#Bag'/>
        <s:snipLinks>
            <rdf:Bag>
                <rdf:li rdf:resource='#snipsnap-search'/>
                <rdf:li rdf:resource='#knowledgebase'/>
                <rdf:li>
                    <s:Snip rdf:about='http://bliki.rimuhosting.com/rdf#knowledgebase/linux/miscapplications/mysql+notes'>
                        <s:attachments
                             rdf:type='http://www.w3.org/1999/02/22-rdf-syntax-ns#Bag'/>
                    </s:Snip>
                </rdf:li>
                <rdf:li rdf:resource='http://bliki.rimuhosting.com/rdf#knowledgebase/linux/miscapplications'/>
                <rdf:li rdf:resource='http://bliki.rimuhosting.com/rdf#knowledgebase/linux/miscapplications/mysql+notes/'/>
                <rdf:li rdf:resource='http://bliki.rimuhosting.com/rdf#knowledgebase/linux'/>
                <rdf:li rdf:resource='#snipsnap-index'/>
                <rdf:li rdf:resource='http://bliki.rimuhosting.com/rdf#knowledgebase/linux/miscapplications/ruby on rails'/>
                <rdf:li rdf:resource='http://bliki.rimuhosting.com/rdf#knowledgebase/'/>
                <rdf:li rdf:resource='http://bliki.rimuhosting.com/rdf#knowledgebase/linux/xen'/>
                <rdf:li rdf:resource='http://bliki.rimuhosting.com/rdf#knowledgebase/linux/'/>
                <rdf:li rdf:resource='http://bliki.rimuhosting.com/rdf#knowledgebase/rimuhosting/vps setup on dedicated servers'/>
                <rdf:li rdf:resource='http://bliki.rimuhosting.com/rdf#knowledgebase/linux/miscapplications/'/>
                <rdf:li rdf:resource='http://bliki.rimuhosting.com/rdf#knowledgebase/linux/java/tomcat on plesk'/>
                <rdf:li rdf:resource='#monit'/>
                <rdf:li rdf:resource='http://bliki.rimuhosting.com/rdf#'/>
                <rdf:li rdf:resource='http://bliki.rimuhosting.com/rdf#knowledgebase/linux/miscapplications/phpmyadmin'/>
                <rdf:li rdf:resource='http://bliki.rimuhosting.com/rdf#knowledgebase/linux/distros/RHEL 4'/>
                <rdf:li rdf:resource='http://bliki.rimuhosting.com/rdf#knowledgebase/linux/misc/ajax autocomplete'/>
                <rdf:li rdf:resource='http://bliki.rimuhosting.com/rdf#knowledgebase/linux/remote server desktop with vnc'/>
                <rdf:li rdf:resource='http://bliki.rimuhosting.com/rdf#knowledgebase/linux/mail/postfix with amavis and mysql'/>
                <rdf:li rdf:resource='http://bliki.rimuhosting.com/rdf#virtualmin notes'/>
                <rdf:li rdf:resource='#ivan'/>
                <rdf:li rdf:resource='http://bliki.rimuhosting.com/rdf#knowledgebase/Security/Port Knocking'/>
                <rdf:li rdf:resource='http://bliki.rimuhosting.com/rdf#knowledgebase/linux/miscapplications/setting up mysql replication'/>
                <rdf:li rdf:resource='http://bliki.rimuhosting.com/rdf#knowledgebase/linux/miscapplications/rpm based mysql5 install'/>
                <rdf:li rdf:resource='http://bliki.rimuhosting.com/rdf#knowledgebase/linux/misc/accessing a vnc server behind a firewall'/>
                <rdf:li rdf:resource='http://bliki.rimuhosting.com/rdf#knowledgebase/Security'/>
                <rdf:li rdf:resource='http://bliki.rimuhosting.com/rdf#knowledgebase/linux/java/alfresco install'/>
                <rdf:li rdf:resource='http://bliki.rimuhosting.com/rdf#knowledgebase/rimuhosting/vps backups'/>
                <rdf:li rdf:resource='http://bliki.rimuhosting.com/rdf#knowledgebase/linux/misc/bash'/>
            </rdf:Bag>
        </s:snipLinks>
    </s:Snip>
</rdf:RDF>
