XAMPP MySQL configuration steps
Linux (tried on ubuntu)
Linux (tried on ubuntu)
1- --> sudo -i
and enter you password (the command sign will be # (root)).
2- --> chmod 777 /opt
and enter you password (the command sign will be # (root)).
2- --> chmod 777 /opt
3- Install XAMPP on your linux. follow the instruction here.
you can start XAMPP by --> /opt/lampp/lampp start
and stop by --> /opt/lampp/lampp stop
4- now we will edit two configuration files /opt/lampp/etc/my.cnf and /opt/lampp/phpmyadmin/config.inc.php
first:
--> gedit /opt/lampp/etc/my.cnf
replace the attributes in your file as defined below blocks
[client]
password = root
port = 3306
socket = /var/run/mysqld/mysqld.sock
[mysqld]
port = 3306
socket = /var/run/mysqld/mysqld.sock
you can start XAMPP by --> /opt/lampp/lampp start
and stop by --> /opt/lampp/lampp stop
4- now we will edit two configuration files /opt/lampp/etc/my.cnf and /opt/lampp/phpmyadmin/config.inc.php
first:
--> gedit /opt/lampp/etc/my.cnf
replace the attributes in your file as defined below blocks
[client]
password = root
port = 3306
socket = /var/run/mysqld/mysqld.sock
[mysqld]
port = 3306
socket = /var/run/mysqld/mysqld.sock
5- save and close the file.
6- --> gedit /opt/lampp/phpmyadmin/config.inc.php
replace the blocks in your files with the followinng blocks
/* Authentication type and info */
$cfg['Servers'][$i]['auth_type'] = 'config';
$cfg['Servers'][$i]['host'] = 'localhost';
$cfg['Servers'][$i]['connect_type'] = 'socket';
$cfg['Servers'][$i]['port'] = '3306';
$cfg['Servers'][$i]['user'] = 'root';
$cfg['Servers'][$i]['password'] = 'root';
$cfg['Servers'][$i]['AllowNoPasswordRoot'] = false;
$cfg['Servers'][$i]['socket'] = '/var/run/mysqld/mysqld.sock';
/* User for advanced features */
$cfg['Servers'][$i]['controluser'] = 'root';
$cfg['Servers'][$i]['controlpass'] = 'root';
7- Save and close the file
8- restart XAMPP
--> /opt/lampp/lampp restart
now try MySQL on XAMPP and long live linux :D
No comments:
Post a Comment