PDA

View Full Version : MySQL help




G3-Pwnz-G4
Jun 1, 2004, 09:43 AM
i have just installed php 4.3 and mysql 5.x onto my system, mainly just to experiment with them until i can afford an actual osx server. i'm running 10.3.4 (not server edition), and what i want to know is how to create databases. i know there is probably a way to do it via the terminal, but it's above me on how to do it.

any help would be appreciated.



robbieduncan
Jun 1, 2004, 11:00 AM
Did you try reading the manual, in particular the tutorial section (http://dev.mysql.com/doc/mysql/en/Tutorial.html)?

Versello
Jun 1, 2004, 11:55 AM
Install phpmyadmin. It makes administrating mysql a piece of cake.

davecuse
Jun 1, 2004, 12:23 PM
I've been using CocoaMySQL, it's pretty good. I like it better than any web front ends I've seen.

CocoaMySQL (http://www.apple.com/downloads/macosx/networking_security/cocoamysql.html)

G3-Pwnz-G4
Jun 1, 2004, 04:48 PM
i have installed phpmyadmin, but it won't let me "connect" to mysql. it keeps saying access denied. i'm really new to this so i have no idea what category this falls under.

Rower_CPU
Jun 1, 2004, 05:46 PM
There's a few reasons that this could be happening...

Do you have phpmyadmin installed on the same server as MySQL? Have you taken care of the configuration of phpmyadmin to login with the correct info?

G3-Pwnz-G4
Jun 1, 2004, 07:40 PM
There's a few reasons that this could be happening...

Do you have phpmyadmin installed on the same server as MySQL? Have you taken care of the configuration of phpmyadmin to login with the correct info?
yeah, both are installed on this computer. the thing is, i have no idea what the "correct info" is. keeps saying access denied over and over again, and nothing nowhere even hinted on what the "correct settings" were.

i'm a complete noob at this stuff.

Rower_CPU
Jun 1, 2004, 10:07 PM
OK, fair enough. Here's an example of my settings from phpmyadmin's config.inc.php file:

$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]['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'] = 'http'; // Authentication method (config, http or cookie based)?
$cfg['Servers'][$i]['user'] = 'root'; // MySQL user
$cfg['Servers'][$i]['password'] = ''; // MySQL password (only needed
// with 'config' auth_type)

I prefer to login via HTTP session, rather than store my login info in the config file. The config file has a ton of comments to guide you through the setup - the key is in how MySQL was installed and configured.

tomf87
Jun 2, 2004, 02:27 PM
I would just use CocoaMySQL as well, like davecuse suggested. Setup is a ton simpler: you just launch it, give it the IP of the server, username, and password, and you're off to the races.

Rower_CPU
Jun 2, 2004, 02:37 PM
I would just use CocoaMySQL as well, like davecuse suggested. Setup is a ton simpler: you just launch it, give it the IP of the server, username, and password, and you're off to the races.

Only if your access privileges are set to allow remote connections.

varmit
Jun 2, 2004, 11:03 PM
On the same machine that you have everything installed. Use CocoaMySQL, and connect to host: 127.0.0.1, with user: mysql. And try leaving the password blank.

xelterran
Jun 7, 2004, 10:48 AM
Hey, im also trying to do the same thing. I am using CocoaMySql to connect but I can only login with localhost/mysql/nopassword and this doesnt allow me to create new databases. Im guessing I need to create some kind of master account but im not sure how.. any help appreciated! :)

davecuse
Jun 7, 2004, 11:35 AM
Hey, im also trying to do the same thing. I am using CocoaMySql to connect but I can only login with localhost/mysql/nopassword and this doesnt allow me to create new databases. Im guessing I need to create some kind of master account but im not sure how.. any help appreciated! :)

My host uses CPanel for all configurations, which makes it extremely simple to setup an admin account for mysql. If your host uses something similar I would recommend going there and looking around.

A quick plug for my host, who I think offer a great service.

HostRocket (http://www.hostrocket.com/)

G3-Pwnz-G4
Jun 7, 2004, 02:38 PM
...what are you talking about? that wasn't even related to his question. xelterran, i'm also stumped on what to do here.

i think that i should clarify that i'm trying to use mysql on MY PERSONAL COMPUTER, not an external host.

davecuse
Jun 7, 2004, 03:57 PM
...what are you talking about? that wasn't even related to his question. xelterran, i'm also stumped on what to do here.

i think that i should clarify that i'm trying to use mysql on MY PERSONAL COMPUTER, not an external host.

ha, I just re-read the original post. I typed that while I was waiting for someone's computer to reboot on the phone... oops

I think PHPMyAdmin would be your best bet to actually set up the administrative account, it's got a pretty intuitive interface. I'm not too familiar with using OS X as for any server applications, I use a linux box for that, and stay strictly as a client on my PowerBook. Give PHPAdmin a try though.
http://www.phpmyadmin.net/home_page/

xelterran
Jun 8, 2004, 12:53 PM
I think the answers lie in this page: http://dev.mysql.com/doc/mysql/en/GRANT.html