Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

HELP! Creating New Database - Win 2003 Server Install

Status
Not open for further replies.

technobia

ISP
Sep 8, 2005
53
US
I have a dedicated Windows 2003 server with IIS 6.0, I have installed PHP 5.0.5 and MySQL 4.1. I am the only server admin. There is no shared hosting control panel like you might find in a shared hosting environment.

My main objective is to install ZenCart shopping cart, which required PHP & MySQL, for several of the websites I host.
I am a intermediate level systems administrator and trying to figure out the PHP & MySQL part has been one of the more frustrating experiences I have had in some time.

I have been going through the documentation for MySQL which appears to be largely for programmers and developers. Therefore, for a newbie, it is VERY difficult to sort out what is appropriate for my environment and what is not and how to perform what I would think would be simple operations. I do not wish to become a developer or programmer at this time. I just want to get the applications installed and be able to maintain them properly.

My frustration:

I have been searching the web and MySQL docs on how to create a new database in MySQL. Something I would think would be very simple to locate info on and easy to do. All I found was the command line syntax in the MySQL docs. Seemed simple but didn't work. I am not sure why but I have discovered that some of the command line syntax provided in the MySQL.com documentation is wrong, so when something does not work, it is a guessing game to determine if it is me or the syntax or both.

So, I thought I would install the MySQL Admin GUI thinking that would be much more intuitive. I can not find ANY reference on how to create a new database in the help. Thinking it is a terminology issue, perhaps they call it something else???? I have been searching for a glossary. No luck with that either, and this goes on and on....hence my utter need to scream at this point!!!

Sorry for the rant - I think I feel better now ;-)

If anyone has any resources or advice I am all ears and will be VERY appreciative.

Thanks - Jody

 
Insufficient data for a meaningful answer.



I don't know what database server you're used to, by MySQL has exactly one interface to the database server: SQL queries. Microsoft's SQL Server provides two: SQL queries and whatever proprietary backend Microsoft's GUI tools use. You may install a GUI tool for MySQL, but that GUI tool is only a shell to SQL queries that are passed to MySQL.

One reason for MySQL's providing only one interface is that unlike Microsoft's SQL Server, MySQL is intended to be written on more than one operating system. Platform agnosticism makes proprietary backend protocols very hard to implement.



In accordance with , the absolute minimum SQL query necessary to create a database named "foo" is:

CREATE DATABASE foo

If you are logged into MySQL as a user with sufficient privileges to create a database and if you don't use a MySQL reserved word (see the command should create a database.


"Seemed simple but didn't work." is vague in the extreme. Can you provide a more exact description of what you did and what error you got?

Want the best answers? Ask the best questions!

TANSTAAFL!!
 
Geez. The most frustrating part for me would be dealing with Windows :).

Anyway, I don't use windows, but phpMyAdmin is a great web-based tool for working with MySQL databases. You can find it here...

Mark
 
I have never used a database server before. MySQL is my first experience with SQL at all other than just poking around in MS-SQL Server 2000 briefly.

OK, I logged in to my Windows server with an Admin account and the MySQL Command Line Client as "root". I ran the CREATE DATABASE MyDB, all I get is a "->" cursor, no error or success message, nothing.

I then loaded the MySQL Administrator GUI thinking I would see the MyDB there but, nope. There also is no such MyDB in the C:\MySQL\data folder as I would expect to see.

So, obviously I am missing something really big here or there is something very wrong. How do I verify that it was even created?

I have no choice in using a Windows server. I have tried to install phpMyAdmin and can not get that working either.

I have phpMyAdmin installed in my default website folder. I have given it all the rights it needs as I would any website in IIS. But, when I try to load the index.php file the browser hangs and eventually goes to Page Not Found.

I have verified that the PHP is working as I can load the test.php page and see all the config data. I was able to verify MySQL was installed correctly, it think by running C:\MySQL\bin\mysqladmin -v and then C:\MySQL\bin\mysqlshow -u root -p entered the password and it returned databeses: MySQL and test.

dazed and confused!
Thanks - Jody
 
Jody,
When ending a line at the console, use a semi-colon.

CREATE DATABASE myDB;

Also, there is a file in the phpMyAdmin directory called config.inc.php. You;ll need to edit a chunk of it for your config...

$cfg['Servers'][$i]['host'] = 'localhost'; // MySQL hostname or IP address
$cfg['Servers'][$i]['port'] = ''; // MySQL port - leave blank for default port
$cfg['Servers'][$i]['socket'] = ''; // Path to the socket - leave blank for default socket
$cfg['Servers'][$i]['connect_type'] = 'tcp'; // How to connect to MySQL server ('tcp' or 'socket')
$cfg['Servers'][$i]['extension'] = 'mysql'; // The php MySQL extension to use ('mysql' or 'mysqli')
$cfg['Servers'][$i]['compress'] = FALSE; // Use compressed protocol for the MySQL connection
// (requires PHP >= 4.3.0)
$cfg['Servers'][$i]['controluser'] = ''; // MySQL control user settings
// (this user must have read-only
$cfg['Servers'][$i]['controlpass'] = ''; // access to the "mysql/user"
// and "mysql/db" tables).
// The controluser is also
// used for all relational
// features (pmadb)
$cfg['Servers'][$i]['auth_type'] = 'config'; // Authentication method (config, http or cookie based)?
$cfg['Servers'][$i]['user'] = 'root'; // MySQL user
$cfg['Servers'][$i]['password'] = 'root password'; // MySQL password (only needed


That should get you started.
Mark
 
I will try the trailing " ; "

As for the config.inc.php my settings are as follows

$cfg['Servers'][$i]['host'] = '209.200.85.216';
$cfg['Servers'][$i]['port'] = '';
$cfg['Servers'][$i]['socket'] = '';
$cfg['Servers'][$i]['connect_type'] = 'tcp';
$cfg['Servers'][$i]['extension'] = 'mysqli'; Also tried mysql
$cfg['Servers'][$i]['compress'] = FALSE;
$cfg['Servers'][$i]['controluser'] = 'pma';
$cfg['Servers'][$i]['controlpass'] = 'pmapass';
$cfg['Servers'][$i]['auth_type'] = 'http';
$cfg['Servers'][$i]['user'] = 'root';
$cfg['Servers'][$i]['password'] = 'rootpword';
 
THANK YOU Kozusnik!

Using the trainling ; worked! YEA! I created two new databases and can see them in both the Admin GUI and in the data folder. THANK YOU Kozusnik! So I can now create tables and whatever I need in the Admin GUI as per ZenCart requirements, right?

Jody
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top