RE: [PHP] Connect to MySql (Basics on Windows)
| From: | Shashank Tripathi | Date: | Sun, 30 Jul 2000 04:56:19 +0000 |
| Subject: | RE: [PHP] Connect to MySql (Basics on Windows) | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-9018@lists.php.net to get a copy of this message | ||
Ourima,
I assume you have downloaded the mysql shareware. After doing that, go to
the directory where you have saved extracted mysql, for instance
"c:\mysql\bin", in a dos prompt.
Once there, write the following command.
----------------------------------
c:\mysql\bin> mysqladmin -u root create mydb01 password root
----------------------------------
This will create a database named mydb01, with a username of 'root' and a
password of 'root'.
Now some of the commands you could execute after this include:
----------------------------------
c:\mysql\bin> mysql
c:\mysql\bin> use mydb01
c:\mysql\bin> show tables
c:\mysql\bin> create table mytable01 (
name varchar(25),
password varchar(25)
);
c:\mysql\bin> insert into mytable01 values ('ourima', 'ourima');
c:\mysql\bin> select * from mytable01;
...etc
----------------------------------
Lemme know if this helps.
Good luck
Shanx
http://shanx.com
-----Original Message-----
From: Jason Brooke [mailto:jason@qgl.org]
Sent: Sunday, July 30, 2000 12:33 PM
To: Ourima; PHP Mailing List
Subject: Re: [PHP] Connect to MySql
> Hi all,
>
> I can neither create database nor change user and and
> the password in mySql of standard db . What's wrong?
>
> Thanks,
>
> Ourima
Based on the tiny amount of information you've supplied, it could be one or
more of many reasons. Here's a few I can think of:
- Mysql has no databases yet
- Mysql may not have suitable filesystem permissions to access existing
databases
- Mysql is not running
- You're supplying the wrong username and/or password
- The username/password you're supplying has insufficient priviledge to do
what you're trying to do
- The database/table/column you're trying to query doesn't exist
- You're supplying a malformed sql statement to Mysql
If you haven't read about the way Mysql handles database permissions, you'll
need to do so before you go any further. You'll find almost all the
documentation you need at http://www.mysql.com
jason
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: php-general-unsubscribe@lists.php.net
For additional commands, e-mail: php-general-help@lists.php.net
To contact the list administrators, e-mail: php-list-admin@lists.php.net