asongisabeautifullie Posted March 23, 2003 Share Posted March 23, 2003 Hey I\'ve pretty much just started using MySQL, and having installed it for my local server (Windows 2000 with IIS) and set the password for the root user I still find I can connect to my MySQL server without giving either a username or a password. This means I can run SQL statements in my PHP pages without specifying a connection to MySQL. What do I do to ensure a password is needed to connect to the MySQL server? Thanks, much appreciated Adam Quote Link to comment https://forums.phpfreaks.com/topic/255-connecting-to-mysql/ Share on other sites More sharing options...
shivabharat Posted March 24, 2003 Share Posted March 24, 2003 U have to read more about \"Environment Variable\" i.e u have to edit my.cfg file U can prompt the user to enter the user name and password. If u have a mysql manual u can learn more there Quote Link to comment https://forums.phpfreaks.com/topic/255-connecting-to-mysql/#findComment-777 Share on other sites More sharing options...
LeoXavior Posted March 28, 2003 Share Posted March 28, 2003 Read this: http://robouk.mchost.com/tuts/tutorial.php...utorial=server1 Browse to the setup area dealing with mysql tells you how to set a password for \"root\" the default user for mysql, also you can simply \"find and delete\" my.ini on your system and then re-run mysqladmin if your user newer 3.51+ versions of mysql it should prompt u for a username and password... Then in phpmyadmin go into the mysql databse find the users table and delete all entries \"ACCEPT\" for the user/password you currently want to use so is only one valid user/pass in the database. Quote Link to comment https://forums.phpfreaks.com/topic/255-connecting-to-mysql/#findComment-826 Share on other sites More sharing options...
asongisabeautifullie Posted April 3, 2003 Author Share Posted April 3, 2003 Thanks a lot, that was really helpful I have another question though about performance. I\'m using PHP and MySQL to search a catalog of around 2000 books by author, title and publisher. Firstly, is searching 3 attributes (all varchar) with this many rows going to be really slow? Secondly, the way I\'ve written my script at the moment the query is run every time a new page of results is displayed, so if there are 3 pages of results the query will be run 3 times even though the result set is the same, just starting further down the rows. Is there any way to get around this, or is this generally how all multiple results pages work? Thanks again Quote Link to comment https://forums.phpfreaks.com/topic/255-connecting-to-mysql/#findComment-923 Share on other sites More sharing options...
DocSeuss Posted April 3, 2003 Share Posted April 3, 2003 if I understand the question the result set of your query is too long so you want to split it up into sections. if that is the case here is another tutorial link for ya. http://www.phpfreaks.com/tutorials/43/0.php Quote Link to comment https://forums.phpfreaks.com/topic/255-connecting-to-mysql/#findComment-924 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.