|
|
|||||||||
|
|||||||||
|
|||||||||
| |
|||
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Display Modes |
|
|
|
Stay one step ahead of the competition. Evaluate and give feedback
on some of the hottest web development tools on the market today.
Make your opinion heard! Click
Here
|
|
#1
|
|||
|
|||
|
Using MySql
Hello all,
I have followed Ben's setup for apache, Mysql and PHP. I got a local host on my computer great!!! Now how do I adminster MySql so I can create databases? I know how to do it with PHPMyadmin. But have no clue how to do it with MySql. SO I have installed and not sure were to go from here. Can someone help please. Thanks, Attila www.glorynaspiration.com
__________________
Thanks, Attila http://www.glorynaspiration.com http://www.abitofthings.com |
|
#2
|
|||
|
|||
|
Why would you want to is the question that comes to mind... however, if you want to know, you just have to go to the C:\mysql\bin directory and run mysql.exe and manually type the commands from there.
|
|
#3
|
|||
|
|||
|
I beleive taht I have expressed myself wrong. I have everything installed. But have no database. I have MySql.
How do I know were my databases are going to be saved at? How do I create a database? In PHP I would do this PHP Code:
But were is this database created n my drive. I have only used PHPMyadmin before. Should I install and use that? SO basicly I have MySql installed but no databases how do I do the next step thanks. Hope this makes sence. Attila |
|
#4
|
|||
|
|||
|
The front page of phpmyadmin allows you to create a new database easily. The actual data files are stored in C:\mysql\data\ though to backup your databases you should always export to an sql file. If you need clarification, just say and I'll post some screencaps to show you...
|
|
#5
|
|||
|
|||
|
I know how to us the PhP Myadmin.
BUt I installed MySql....How do I set uo the databases? Yes please post screenshots. |
|
#6
|
|||
|
|||
|
To create a database in MySQL, at the prompt simply type:
create database 'databasename' ; Where the 'databasename' without the quotes is the name you've given your database. Then to use that database type in the following: use 'databasename'; this will now activate the database you just created. You are now ready to create tables and populate them. If you've never worked with MySQL before I would recommend the following book: "Managing & Using MySQL" it's an O'Reilly book. Second Edition covers v 4.0.1. This will be very helpful. Also Your database can be found in C:\mysql\data\, provided of course that you installed MySQL in the root directory of your windows box. Hope that helps you out. Oh by the way, remember to end all of your commands with ';'. It took me a little while to get used to that part. Enjoy |
|
#7
|
|||
|
|||
|
mysql_connect('localhost','root')
as for the database, you have to create that your self. mysql_query("create database 'databasename'"); That will create your database, in php. however with localhost and root, you will be able to install phpmyadmin on your server. once you have done that creating a database/tables will be as simple as pie |
![]() |
| Viewing: Dev Articles Community Forums > Databases > MySQL Development > Using MySql |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|