Reputation: 6438
I have a development box and a development server.
I have some development tools on my development box with which I want to access MySQL residing on a development server.
The development server was set up with XAMPP.
How do I make mysql available over the network? What do I use for the host name?
Thanks
Upvotes: 3
Views: 20465
Reputation: 3011
Step 1: sudo /opt/lampp/lampp security
set the mysql root password
Step 2: Access the database as sudo /opt/lampp/bin/mysql -u root -p
then enter password of root user.
Step 3: Run the query run this query.
GRANT ALL ON <db_name>.* TO <user_name>@'%' IDENTIFIED BY '<some_password>';
and then type exit
.
Step 4: Edit my.cnf (should be at /opt/lampp/etc/) and comment the line:
skip-networking
This line is uncommented when you run the Lampp security tool.
As
sudo nano /opt/lampp/etc/my.cnf
, after comment as #skip-networking
type control+x
=> y
=> enter
NOTE: Of course, you should take the necessary steps to secure your databases properly after enabling network access.
Upvotes: 1
Reputation: 1073
For accessing mysql of XAMPP over a network :
-go to xammp directory XAMPP\apache\conf\extra\
-open httpd-xampp.conf file and comment the Require local
#
# New XAMPP security concept
#
<LocationMatch "^/(?i:(?:xampp|security|licenses|phpmyadmin|webalizer|server-status|server-info))">
#Require local
ErrorDocument 403 /error/XAMPP_FORBIDDEN.html.var
</LocationMatch>
-create the database in mysql and create new user with username and password with Host : % (any host) which will allow to connect the 'username'@'%' over the network
-open command prompt type ipconfig
now you can access the mysql at your ipaddress:3306 (3306 is default port for mysql)
Upvotes: 0
Reputation: 3535
comment out the line:
skip-networking -> #skip-networking
in the file:
/Applications/XAMPP/xamppfiles/etc/my.cnf
Upvotes: 9
Reputation: 10707
Try this: http://www.cyberciti.biz/tips/how-do-i-enable-remote-access-to-mysql-database-server.html
Upvotes: 0