blackcell Posted May 29, 2008 Share Posted May 29, 2008 Hello, I just realized all of my work has demanded me use a local mysql database. Now I need to connect to another database being served by the computer across the room from me. I have tried using the IP address and even the pc name but no luck. Anybody know the trick? I am getting: Warning: mysql_connect() [function.mysql-connect]: Access denied for user 'user'@'myComputer' (using password: YES) in X:\xampp\htdocs\ticket\run\parts_report.module.php on line 38 Cannot connect to database on otherComputer: Quote Link to comment https://forums.phpfreaks.com/topic/107786-solved-connecting-to-something-other-than-local-host-for-mysql/ Share on other sites More sharing options...
rhodesa Posted May 29, 2008 Share Posted May 29, 2008 On the remote MySQL server, you need to allow your user to connect from hosts other then localhost. Do you have phpMyAdmin set up on that MySQL server? Quote Link to comment https://forums.phpfreaks.com/topic/107786-solved-connecting-to-something-other-than-local-host-for-mysql/#findComment-552497 Share on other sites More sharing options...
blackcell Posted May 29, 2008 Author Share Posted May 29, 2008 Yea, so it is a myphpadmin/mysql server setting that allows remote access? Quote Link to comment https://forums.phpfreaks.com/topic/107786-solved-connecting-to-something-other-than-local-host-for-mysql/#findComment-552513 Share on other sites More sharing options...
rhodesa Posted May 29, 2008 Share Posted May 29, 2008 It's a MySQL setting per user. phpMyAdmin is a tool to help manage MySQL When adding a user to MySQL, the default is to only allow connections from localhost. You need to specify that the user can connect from anywhere, or at least a specific IP. p.s. - this should be moved to the MySQL forum Quote Link to comment https://forums.phpfreaks.com/topic/107786-solved-connecting-to-something-other-than-local-host-for-mysql/#findComment-552516 Share on other sites More sharing options...
craygo Posted May 29, 2008 Share Posted May 29, 2008 you have to allow the user you are logging in as, access from remote locations. In phpmyadmin just open up the mysql database then go to the users table. find the user you want remote access for and change the host to "%" without the quotes. You must be logged into phpmyadmin as root or someone who has rights to the table. Either that or get some admin tools from the mysql site http://dev.mysql.com/downloads/gui-tools/5.0.html This will allow you to setup users and rights Ray Quote Link to comment https://forums.phpfreaks.com/topic/107786-solved-connecting-to-something-other-than-local-host-for-mysql/#findComment-552518 Share on other sites More sharing options...
blackcell Posted May 29, 2008 Author Share Posted May 29, 2008 Thanks I got it from here. Quote Link to comment https://forums.phpfreaks.com/topic/107786-solved-connecting-to-something-other-than-local-host-for-mysql/#findComment-552533 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.