PDA

View Full Version : Setting Up A My SQL Database



Rockonmetal
07-10-2007, 06:31 PM
Ok, So I have Dreamweaver CS3 and Wamp5 Which I have installed both. I haven't gone through the Files to put in a username server name or password because of one reason, I DON'T KNOW WHICH TO EDIT!!!!!!! If anyone could help me... The Database is going to be like a testing thing on my computer so I can Learn PHP Scripts. I am writing some easy ones but I need to get a data base so Dreamweaver can get this one thing down...
Thanks

thetestingsite
07-10-2007, 07:19 PM
I believe that WAMP5 comes with phpmyadmin installed. If this is the case, go to it (by going to http://localhost/phpmyadmin/ or right clicking on the tray icon and going to the phpmyadmin shortcut). Once there, you can add a new database, edit existing ones, change user info, etc.

Hope this helps.

NOTE: By default, the username and password is "root" (without the quotes around it) with no password.

Rockonmetal
07-10-2007, 07:36 PM
Yes but it says PHP MyAdmin - Error...

I don't have it...

Do i open http://localhost/phpMyadmin/
?

I am using the http://localhost/phpmyadmin/scripts/setup.php
Script Setup thing... is that the right thing?

can anyone help or confirm or tell me how to work this????

thetestingsite
07-10-2007, 08:34 PM
Give me a little while so that I can download and install WAMP on my computer and I'll see what you need to do (step by step).

Rockonmetal
07-10-2007, 08:36 PM
ok thanks man i really appreciate your help

thetestingsite
07-10-2007, 08:42 PM
Ok, step by step:


Click on the tray icon
Click on phpMyAdmin
It opens your browser to http://localhost/phpmyadmin/
By default, it is set up to go to the main page of phpmyadmin. This is where you can set up databases, edit user privelages, etc.


Hope this helps.

Rockonmetal
07-10-2007, 08:51 PM
Yes but I get this
"phpMyAdmin - Error" with red background and white text and without quotes.

thetestingsite
07-10-2007, 08:57 PM
What is the error? You may need to edit the config.inc.php file in the phpmyadmin directory to point to the right username/password combo. If that doesn't work. Also, make sure that that file is called config.inc.php and not something like config.inc.php-dist.

Hope this helps.

Rockonmetal
07-10-2007, 09:07 PM
Ok heres what I have in there
<?php

/* !!! DO NOT EDIT THIS FILE, EDIT config.inc.php INSTEAD !!! */

/* $Id: config.default.php,v 1.8 2005/12/16 14:07:10 lem9 Exp $ */
// vim: expandtab sw=4 ts=4 sts=4:

/**
* phpMyAdmin default configuration, you can copy values from here to your
* config.inc.php
*
* All directives are explained in Documentation.html
*/


/**
* Your phpMyAdmin URL.
*
* Complete the variable below with the full url ie
* http://www.your_web.net/path_to_your_phpMyAdmin_directory/
*
* It must contain characters that are valid for a URL, and the path is
* case sensitive on some Web servers, for example Unix-based servers.
*
* In most cases you can leave this variable empty, as the correct value
* will be detected automatically. However, we recommend that you do
* test to see that the auto-detection code works in your system. A good
* test is to browse a table, then edit a row and save it. There will be
* an error message if phpMyAdmin cannot auto-detect the correct value.
*/
$cfg['PmaAbsoluteUri'] = '';

/**
* Disable the default warning that is displayed on the DB Details Structure page if
* any of the required Tables for the relationfeatures could not be found
*/
$cfg['PmaNoRelation_DisableWarning'] = FALSE;

/**
* The 'cookie' auth_type uses blowfish algorithm to encrypt the password. If
* at least one server configuration uses 'cookie' auth_type, enter here a
* passphrase that will be used by blowfish. The maximum length seems to be 46
* characters.
*/
$cfg['blowfish_secret'] = '';

/**
* Server(s) configuration
*/
$i = 0;
// The $cfg['Servers'] array starts with $cfg['Servers'][1]. Do not use
// $cfg['Servers'][0]. You can disable a server config entry by setting host
// to ''. If you want more than one server, just copy following section
// (including $i incrementation) serveral times. There is no need to define
// full server array, just define values you need to change.
$i++;
$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'] = 'MyUsername'; // MySQL user
$cfg['Servers'][$i]['password'] = 'MyPassword'; // MySQL password (only needed
// with 'config' auth_type)
$cfg['Servers'][$i]['only_db'] = ''; // If set to a db-name, only
// this db is displayed in left frame
// It may also be an array of db-names, where sorting order is relevant.
$cfg['Servers'][$i]['hide_db'] = ''; // Database name to be hidden from listings
$cfg['Servers'][$i]['verbose'] = ''; // Verbose name for this host - leave blank to show the hostname

$cfg['Servers'][$i]['pmadb'] = ''; // Database used for Relation, Bookmark and PDF Features
// (see scripts/create_tables.sql)
// - leave blank for no support
// DEFAULT: 'phpmyadmin'
$cfg['Servers'][$i]['bookmarktable'] = ''; // Bookmark table
// - leave blank for no bookmark support
// DEFAULT: 'pma_bookmark'
$cfg['Servers'][$i]['relation'] = ''; // table to describe the relation between links (see doc)
// - leave blank for no relation-links support
// DEFAULT: 'pma_relation'
$cfg['Servers'][$i]['table_info'] = ''; // table to describe the display fields
// - leave blank for no display fields support
// DEFAULT: 'pma_table_info'
$cfg['Servers'][$i]['table_coords'] = ''; // table to describe the tables position for the PDF schema
// - leave blank for no PDF schema support
// DEFAULT: 'pma_table_coords'
$cfg['Servers'][$i]['pdf_pages'] = ''; // table to describe pages of relationpdf
// - leave blank if you don't want to use this
// DEFAULT: 'pma_pdf_pages'
$cfg['Servers'][$i]['column_info'] = ''; // table to store column information
// - leave blank for no column comments/mime types
// DEFAULT: 'pma_column_info'
$cfg['Servers'][$i]['history'] = ''; // table to store SQL history
// - leave blank for no SQL query history
// DEFAULT: 'pma_history'
$cfg['Servers'][$i]['verbose_check'] = TRUE; // set to FALSE if you know that your pma_* tables
// are up to date. This prevents compatibility
// checks and thereby increases performance.
$cfg['Servers'][$i]['AllowRoot'] = TRUE; // whether to allow root login
$cfg['Servers'][$i]['AllowDeny']['order'] // Host authentication order, leave blank to not use
= '';
$cfg['Servers'][$i]['AllowDeny']['rules'] // Host authentication rules, leave blank for defaults
= array();


Is That what it should be... thats as far as I read. I didn't change anything except for user and password.
Just Want to let you know I am just setting up a sorta testing site thing, where I can learn to use PHP.

Thanks

Rockonmetal
07-10-2007, 09:11 PM
BTW The error now says:
phpMyAdmin - Error
Cannot load mysql extension. Please check your PHP configuration. - Documentation

thetestingsite
07-10-2007, 09:12 PM
Set this line:



$cfg['Servers'][$i]['auth_type'] = 'config'; // Authentication method (config, http or cookie based)?


to 'cookie', then erase these lines (Just the parts in red):



$cfg['Servers'][$i]['user'] = 'MyUsername'; // MySQL user
$cfg['Servers'][$i]['password'] = 'MyPassword'; // MySQL password (only needed


After that, go to the phpmyadmin page, and enter "root" for the username. If that still doesn't work, let me know and I'll set up a test database for you on one of my servers.

Hope this helps.

Rockonmetal
07-10-2007, 09:19 PM
I am getting the same error message
"phpMyAdmin - Error
Cannot load mysql extension. Please check your PHP configuration. - Documentation"

Rockonmetal
07-10-2007, 09:34 PM
Oooo I think this might be it... I have this program on my computer which records what I plug into called Cakewalk Music Creator 2003. In the folder C:\wamp there is a template file 12kbs and its called "wampmanager.tpl". What Program should open it? Cuz its opening with cakewalk and I don't think Cakewalk is supposed to do this kind of stuff... Cuz it just records music...

Rockonmetal
07-10-2007, 09:55 PM
Can anyone tell me what is used to open a .tpl file so I could set the default? I think that might be the problem...

Rockonmetal
07-10-2007, 10:20 PM
Testingsite hows the database set up going?? I really appreciate your help a lot a lot...

thetestingsite
07-10-2007, 11:12 PM
Can anyone tell me what is used to open a .tpl file so I could set the default? I think that might be the problem...

You could use any text editor; such as Notepad, to view the code of the template file.



Testingsite hows the database set up going?? I really appreciate your help a lot a lot...

I sent you a Private Message with the info. Let me know if you need any more help.

Rockonmetal
07-11-2007, 12:18 AM
ok apparently I cant open it via Dreamweaver CS3 cuz its not in my root folder, and I really am amazed u took the time to MAKE a mysql database for myself... wow, man you went a little bit overboard... I thank you but, Unfortunitly I wasn't expecting this much. All I wanted was to get that phpMyAdmin working... via localhost

thetestingsite
07-11-2007, 12:22 AM
Quick question, are you sure that the MySQL service is running on your WAMP installation? If it is, you need to also make sure that the mysql extesion (php_mysql.dll) is in the "ext" directory of the PHP install folder and also make sure that it is enabled in your php.ini file. Other than that, I'm not sure what else it could be off the top of my head.

Hope this helps.

Rockonmetal
07-11-2007, 12:40 AM
ok i'll check that

Rockonmetal
07-11-2007, 12:42 AM
what should be turned on in the php.ini?

thetestingsite
07-11-2007, 12:46 AM
In the php.ini file, you will find where the extensions are (like the following):



;extension=php_mssql.dll
;extension=php_msql.dll
;extension=php_mysql.dll


Make sure there is not a semicolon in front of the line:



extension=php_mysql.dll


Note: after making changes to the php.ini file, you will need to restart the web server.

Rockonmetal
07-11-2007, 12:50 AM
Ok I took it out and I am still getting that same error message.
phpMyAdmin - Error
Cannot load mysql extension. Please check your PHP configuration. - Documentation

thetestingsite
07-11-2007, 12:54 AM
Did you restart the server after you changed the ini file? If not, do so now; however, if you did already, then the extension may be corrupt. If this is the case, you will need to uninstall, then reinstall again (be sure to do a backup of your www folder and whatnot before reinstalling).

Hope this helps.

Rockonmetal
07-11-2007, 01:02 AM
Ok looks like i have to uninstall and reinstall
thanks for the advice alot

thetestingsite
07-11-2007, 01:09 AM
If that doesn't work either, then I suggest downloading Netserver (http://sourceforge.net/projects/netserver/) (which is basically the same thing, just with more control over the servers and also comes with FTP and hMailserver). That's pretty much all I can think of.

Hope this helps.

Rockonmetal
07-11-2007, 01:41 AM
Ok i have re-installed wamp5 what do i do now

thetestingsite
07-11-2007, 01:46 AM
After making sure that all the services are running, open your web browser and go to http://localhost/phpmyadmin/. After that, it should work fine; however, if it still doesn't work then you may need to redownload the file as it may be a corrupt download.

Hope this helps.

Rockonmetal
07-11-2007, 03:13 AM
OK! HAVE GOT NETSERVER TO WORK!!!! Thanks so much!!!

Basicly I did this:
Downloaded netserver installed it then clicked managed servers and installed Apache and My SQL and then it told me to click on shortcuts and log in as root and blank password. Thanks so so so so much!