mySql on Windows XP

Installation and configuration iussues

Moderators: macek, egami, gesf

shin0135
New php-forum User
New php-forum User
Posts: 2
Joined: Wed Nov 26, 2003 9:43 pm

mySql on Windows XP

Postby shin0135 » Wed Nov 26, 2003 11:44 pm

hi all...

I don't know why I couldn't get the right output when I call following pages. When I run /mysql/bin/winmysqladmin.exe, I could see the green lights on the system try.

This is my.ini
#This File was made using the WinMySQLAdmin 1.4 Tool
#11/27/2003 1:20:16 AM

#Uncomment or Add only the keys that you know how works.
#Read the MySQL Manual for instructions

[mysqld]
basedir=E:/mysql
#bind-address=********
datadir=E:/mysql/data
#language=E:/mysql/share/your language directory
#slow query log#=
#tmpdir#=
#port=3306
#set-variable=key_buffer=16M
[WinMySQLadmin]
Server=E:/mysql/bin/mysqld-nt.exe
user=*******
password=*****


Here is the program I tested.

Code: Select all

<?php
mysql_connect("localhost","****","****") or die("Uh Oh, Could not connect");

$Version = mysql_get_server_info();
$HostInfo = mysql_get_host_info();
print "My current MySQL version is: $Version
On $HostInfo";
?>


and here is the output i got
Warning: mysql_connect(): Access denied for user: 'shin0135@localhost' (Using password: YES) in E:\Apache Group\Apache2\htdocs\TestSQL.php on line 2
Uh Oh, Could not connect


When I tested another file like the following,

Code: Select all

<h3> Press RELOAD to add a record to the MySQL database:</h3>
<?
//establish user connection
mysql_connect("localhost");
//open up database
mysql_create_db("testdatabase");
mysql_select_db("testdatabase");
//create table
mysql_query("CREATE TABLE newone(firstName VARCHAR(25),lastName VARCHAR(25))");
mysql_query ("INSERT INTO newone (firstName, lastName) VALUES ('Amir', 'Khan')");
//display the information
$result = mysql_query ("SELECT * FROM newone");
while($row = mysql_fetch_array($result))
{
print ("Added record: " . $row["firstName"]." ".$row["lastName"]." <br>\n");
}
//close user connection
mysql_close();
?>


I got another error message like the following,
Press RELOAD to add a record to the MySQL database:

Warning: mysql_fetch_array(): supplied argument is not a valid MySQL result resource in E:\Apache Group\Apache2\htdocs\testmysql.php on line 13


I don't know what's going on.
Can anybody help me?

Thanks,

liquedus
php-forum Active User
php-forum Active User
Posts: 266
Joined: Tue Apr 08, 2003 5:18 am
Location: Ottawa, Canada
Contact:

Postby liquedus » Thu Nov 27, 2003 10:31 am

hiya,

well the first problem you have is you are supplying the wrong login info.... :wink:

User avatar
WiZARD
Moderator
Moderator
Posts: 1257
Joined: Thu Jun 20, 2002 10:14 pm
Location: Ukraine, Crimea, Simferopol
Contact:

Re: mySql on Windows XP

Postby WiZARD » Mon Dec 01, 2003 9:39 am

Hi shin0135!

first: delete in my.ini this strings
user=*******
password=*****

by default you have a root user with no password but if you want to use a root user to you need set password, in manual you may find how to set password.
why you asking, cause create/delete and manage of rights other users you may only via root.
second: i for example use EMS MySQL Manager i think what it's best solution to manage by MySQL like programm and like database.

P.S. if you have a problem use Google Search engine http://www.google.com


Return to “MySQL Installation”

Who is online

Users browsing this forum: No registered users and 0 guests