skateme Posted December 17, 2006 Share Posted December 17, 2006 what is the username when connecting to mysql??? do we make it when we are installing mysql or what?? thanks in advance! Quote Link to comment https://forums.phpfreaks.com/topic/30981-what-is-the-username-when-connecting-to-mysql/ Share on other sites More sharing options...
ukdmbfan Posted December 17, 2006 Share Posted December 17, 2006 MySQL has root privileges by default, so you can login using your root credentials. When you've done that you can setup new users from within MySQL which is recommended so you can use them to login in the future. Quote Link to comment https://forums.phpfreaks.com/topic/30981-what-is-the-username-when-connecting-to-mysql/#findComment-142950 Share on other sites More sharing options...
wildteen88 Posted December 17, 2006 Share Posted December 17, 2006 try root as the username and leave the password blankThis is the default account MySQL sets up when you install it. However you can change these during installation. Quote Link to comment https://forums.phpfreaks.com/topic/30981-what-is-the-username-when-connecting-to-mysql/#findComment-142952 Share on other sites More sharing options...
skateme Posted December 17, 2006 Author Share Posted December 17, 2006 [quote author=wildteen88 link=topic=118980.msg486664#msg486664 date=1166366471]try root as the username and leave the password blankThis is the default account MySQL sets up when you install it. However you can change these during installation.[/quote]it doesn't work. it says:Warning: mysql_connect() [function.mysql-connect]: Access denied for user 'mypass'@'localhost' (using password: NO) in C:\inetpub\wwwroot\login scripts\login.php on line 16My SQL Error: Access denied for user 'mypass'@'localhost' (using password: NO) Quote Link to comment https://forums.phpfreaks.com/topic/30981-what-is-the-username-when-connecting-to-mysql/#findComment-142959 Share on other sites More sharing options...
wildteen88 Posted December 17, 2006 Share Posted December 17, 2006 Is mypass the username? What is the code you are using to connect to mysql post it here:It should be like this:[code=php:0]$conn = mysql_connect('localhost', 'root', '') or die('Connection error:<br />' . mysql_error());[/code]If the root user doesn't work then you must of changed the password for it. You can rest the password however it is a little tricky and hard to explain. Quote Link to comment https://forums.phpfreaks.com/topic/30981-what-is-the-username-when-connecting-to-mysql/#findComment-143044 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.