Connecting to MySQL
Posted 23 March 2003 - 07:43 PM
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
Posted 24 March 2003 - 06:01 PM
\"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
Posted 28 March 2003 - 04:50 PM
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.
Posted 03 April 2003 - 10:51 AM
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?
Posted 03 April 2003 - 11:00 AM
if that is the case here is another tutorial link for ya.
0 user(s) are reading this topic
0 members, 0 guests, 0 anonymous users