Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

G3-Pwnz-G4

macrumors regular
Original poster
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.
 
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.
 
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?
 
Rower_CPU said:
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.
 
OK, fair enough. Here's an example of my settings from phpmyadmin's config.inc.php file:

PHP:
$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.
 
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.
 
tomf87 said:
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.
 
try

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.
 
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! 🙂
 
xelterran said:
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
 
...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.
 
G3-Pwnz-G4 said:
...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/
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.