Re: create database
| From: | Leonard Tambunan | Date: | Thu, 30 Nov 2000 01:25:29 +0000 |
| Subject: | Re: create database | ||
| References: | 1 | Groups: | php.db |
| Request: | Send a blank email to php-db+get-4861@lists.php.net to get a copy of this message | ||
We can create database using file.ext too.
file.ext:
---------------------------------------------------------------
CREATE DATABASE new;
CREATE TABLE one (
number int(2),
name varchar(30) );
GRANT insert,select ON new.* TO someone@localhost IDENTIFIED BY
'password';
-------------------------------------------------------------------
At system shell,
<shell> mysql < file.ext -u root -p
Regards,
Leonard Tambunan
> Hi,
>
> just open notepad, and put in usual MySQL syntax like Create database name
> (id int(2) ....);
> Save it with any extension you like. Then run the following in the command
> line: 'mysql -u user -p < file.extension'
> file has to be in the bin directory of MySQL.
>
> Hope this helps....OOOPS. soory i just saw you were asking for a way to
> create a DB with notepad. Sorry no idea. I even tend to saying 'not
> possible'. Just use 'mysqladmin' or the command line.
>
> Otis
>
> "Brandon Feldhahn" <BrandonFeldhahn@earthlink.net> schrieb im Newsbeitrag
> news:3A24AC7F.6D812BED@earthlink.net...
> > How do i create a database in notepad using MySQL and PHP? I need to
> > create a database one a localhost, name, and password.
> >
> >
> > --
> > PHP Database Mailing List (http://www.php.net/)
> > To unsubscribe, e-mail: php-db-unsubscribe@lists.php.net
> > For additional commands, e-mail: php-db-help@lists.php.net
> > To contact the list administrators, e-mail: php-list-admin@lists.php.net
> >
>
>
>
> --
> PHP Database Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: php-db-unsubscribe@lists.php.net
> For additional commands, e-mail: php-db-help@lists.php.net
> To contact the list administrators, e-mail: php-list-admin@lists.php.net
>