• Some users have recently had their accounts hijacked. It seems that the now defunct EVGA forums might have compromised your password there and seems many are using the same PW here. We would suggest you UPDATE YOUR PASSWORD and TURN ON 2FA for your account here to further secure it. None of the compromised accounts had 2FA turned on.
    Once you have enabled 2FA, your account will be updated soon to show a badge, letting other members know that you use 2FA to protect your account. This should be beneficial for everyone that uses FSFT.

Setting up MySql on another machine

jonneymendoza

Supreme [H]ardness
Joined
Sep 11, 2004
Messages
6,415
Hi is i possible to setup mysql server on a different machine i.e. a windows machine? if so, how do i access a database from it.

What would be the appropriate URL for it? will it be something like 192.168.0.10:mySqlPort/DatabaseName?
 
As long as the ports you assign to MySQL are open just download the MySQL Workbench tools to remotely access it.
 
You don't use URLs to access MySQL databases, unless you have a scheme that wraps access to the database. There is no such scheme that is standard.
 
ahh ok so only on my code i provide a url to teh database?

right i have installed mysql server on my server pc now i do i access it from this pc?

i want to access it via command prompt and bring up the sql prompt that allows me to type in sql statements etc.

i know how to do it localy by doing cd c:/Mysql and then login from their. how would i "navigate" to mySQL using cd or is their another way to do this?

this is why i was wondering if using a url is the way to go.
 
Locally, on the MySQL server, you need to grant the user that is connecting remote privileges. Instead of specifying 'user'@'localhost' specify 'user'@'%'

Make sure port 3306 is open, or whatever port you use for MySQL.

mysql -h IP_ADDRESS_HERE -u user -p password -d 'database'

Navigate the same way you would on the local system with MySQL commands.
 
this command done on this machine remotely from my server:

mysql -h IP_ADDRESS_HERE -u user -p password -d 'database'

gives me an error saying it doesnt recognise the sql as an internal or extrernal command.

im not quite sure how to grant priviladges from your example BUT when i was running the setup wizard of the mysql server, it asked me if i want to allow remote access to it and i said yes
 
I just did it from my development PC (running WAMP) to my production server.

On the production server, I logged in locally and ran this to create a test user:

USE mysql;

GRANT ALL PRIVILEGES ON *.* TO 'testuser'@'%' IDENTIFIED BY 'testpassword' WITH GRANT OPTION;

On my development PC, I opened the DOS prompt:

cd c:\wamp\bin\mysql\mysql5.1.36\bin

mysql -h 192.168.7.100 --user=testuser --password=testpassword;

My path to MySQL is probably different than yours so you need to adjust it accordingly.

It let me in without a hitch.
 
this command done on this machine remotely from my server:

mysql -h IP_ADDRESS_HERE -u user -p password -d 'database'

gives me an error saying it doesnt recognise the sql as an internal or extrernal command.
Sounds like you've got a lot of learning to do.
 
Yes, but it does not matter if you are using WAMP or MySQL by itself. Just make sure you have the right permissions and that your network is setup properly (port forwarding may be needed on your router).

WAMP should not be used in a production environment.
 
what should be used in a production enviroment to simply connect to a mysql server and do some magic?
 
Back
Top