carlwenrich Posted August 15, 2008 Share Posted August 15, 2008 I'm on a shared server that runs PHP in safe mode, so when I try "$conn = mysql_connect('localhost', $username, $password);" the $password is ignored and the connection refused. Link to comment https://forums.phpfreaks.com/topic/119766-how-do-i-log-onto-a-mysql-database-when-running-in-safe-mode/ Share on other sites More sharing options...
trq Posted August 15, 2008 Share Posted August 15, 2008 Safe mode doesn't have any influence over such a thing. Are you getting ant errors? What are they? Link to comment https://forums.phpfreaks.com/topic/119766-how-do-i-log-onto-a-mysql-database-when-running-in-safe-mode/#findComment-617018 Share on other sites More sharing options...
carlwenrich Posted August 15, 2008 Author Share Posted August 15, 2008 If you look here: http://us3.php.net/function.mysql-connect you'll see that does make a difference. What I need to know is how to connect in safe mode. Link to comment https://forums.phpfreaks.com/topic/119766-how-do-i-log-onto-a-mysql-database-when-running-in-safe-mode/#findComment-617020 Share on other sites More sharing options...
carlwenrich Posted August 15, 2008 Author Share Posted August 15, 2008 ...and here's what I get: Â Warning: mysql_connect() [function.mysql-connect]: Access denied for user 'carlsper_drpl2'@'localhost' (using password: YES) in /home1/carlsper/public_html/cron-zipsads.php on line 3 Could not connect: Access denied for user 'carlsper_drpl2'@'localhost' (using password: YES) Link to comment https://forums.phpfreaks.com/topic/119766-how-do-i-log-onto-a-mysql-database-when-running-in-safe-mode/#findComment-617021 Share on other sites More sharing options...
trq Posted August 15, 2008 Share Posted August 15, 2008 That isn't related to phps global safe_mode but is specific to msyql's functionality. I would say your going to need to speak to your host, you can't seem to pass a password to the mysql server while that options is enabled. Link to comment https://forums.phpfreaks.com/topic/119766-how-do-i-log-onto-a-mysql-database-when-running-in-safe-mode/#findComment-617053 Share on other sites More sharing options...
carlwenrich Posted August 25, 2008 Author Share Posted August 25, 2008 Thanks to those who answered my post. I found out that what I needed to do was pass the encoded password rather than the human password. Link to comment https://forums.phpfreaks.com/topic/119766-how-do-i-log-onto-a-mysql-database-when-running-in-safe-mode/#findComment-625417 Share on other sites More sharing options...
DarkWater Posted August 25, 2008 Share Posted August 25, 2008 By the way, you could tell that it was in fact using the password because it says "(using password: YES)". Link to comment https://forums.phpfreaks.com/topic/119766-how-do-i-log-onto-a-mysql-database-when-running-in-safe-mode/#findComment-625420 Share on other sites More sharing options...
revraz Posted August 25, 2008 Share Posted August 25, 2008 I like to use alien passwords too. Link to comment https://forums.phpfreaks.com/topic/119766-how-do-i-log-onto-a-mysql-database-when-running-in-safe-mode/#findComment-625423 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.