<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:content="http://purl.org/rss/1.0/modules/content/"><channel><title>Mysql on</title><link>https://geekyschmidt.com/tags/mysql/</link><description>Recent content in Mysql on</description><generator>Hugo -- 0.155.3</generator><language>en</language><copyright>Copyright © 2002–2025, Nicholas Schmidt; all rights reserved.</copyright><lastBuildDate>Wed, 31 Dec 2008 16:39:47 +0000</lastBuildDate><atom:link href="https://geekyschmidt.com/tags/mysql/index.xml" rel="self" type="application/rss+xml"/><item><title>Securing MySQL</title><link>https://geekyschmidt.com/2008/12/31/securing-mysql/</link><pubDate>Wed, 31 Dec 2008 16:39:47 +0000</pubDate><guid>https://geekyschmidt.com/2008/12/31/securing-mysql/</guid><description>&lt;p&gt;Here is my quick secure guide for MySQL:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;Rename root user account&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;mysql -u root -p&lt;/li&gt;
&lt;li&gt;use mysql;&lt;/li&gt;
&lt;li&gt;update user set user=”mydbadmin” where user=”root”;&lt;/li&gt;
&lt;li&gt;flush privileges;&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Set the root password for database&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;mysqladmin -u mydbadmin password ‘the-new-password’&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Drop default test database&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;mysql -u mydbadmin -p&lt;/li&gt;
&lt;li&gt;drop database test;&lt;/li&gt;
&lt;li&gt;quit;&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Edit the MySQL server config&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;vi /etc/my.cnf and under [mysqld]&lt;/li&gt;
&lt;li&gt;skip-networking &amp;lt;– Disables network access&lt;/li&gt;
&lt;li&gt;set-variable=local-infile=0 &amp;lt;– prevent against unauthorized reading from local files&lt;/li&gt;
&lt;li&gt;bind-address=127.0.0.1&lt;/li&gt;
&lt;li&gt;restart mysql /etc/init.d/mysqld restart&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;/ul&gt;</description></item></channel></rss>