Stream of Ry

Yet Another Geek In The World

Archive for the ‘mysql’ tag

Apache, MySQL and PHPMyAdmin stuff

leave a comment

I finally moved towards native Apache and MySQL installations instead of the usual LAMPP. This way, I can have all the files on my root directory. As usual, this is going to be a dump of all the different workarounds to achieve some functionality.

<All packages (apache2,mysql-server,phpmyadmin) are installed via Synaptic on a Ubuntu 9.10 box>

Apache: Per user htdocs directory
mkdir ~/public_html;
chmod 755 ~/public_html;
sudo a2enmod userdir;
sudo /etc/init.d/apache2 restart;

If you want to change the folder name (not using public_html), you have to change the config file:
/etc/apache2/mods-available/userdir.conf

As always, make a backup of any existing config file first before changing.

MySQL: Resetting the root password to null
sudo /etc/init.d/mysql stop;
sudo mysqld_safe --skip-grant-tables &;
sudo mysql --user=root mysql;

then inside MySQL:
update user set password=PASSWORD("") where User='root';
flush privileges;
exit;

back to terminal:
sudo killall mysqld_safe
sudo /etc/init.d/mysql start

PHPMyAdmin: Allowing null users to log in
Edit /etc/phpmyadmin/config.inc.php and look for ‘AllowNoPassword’ and set it to TRUE.

The following would lead to a public_html folder as web space, a password-less root and enabling the password-less root to log in to phpmyadmin.

It’s probably a security expert’s worst nightmare but it sure is convenient.

Written by rystraum

July 2nd, 2010 at 10:41 am

Posted in Programming,Software

Tagged with , ,