Apache Web-Serving With Mac OS X, Part 5
Pages: 1, 2, 3
Hello, MySQL!
If the above went smoothly, it's time to make a quick PHP script to make sure database communication is possible. Copy the following code into your favorite text editor (like BBEdit), and save the file as test.php within a Web site directory (either /Library/WebServer/Documents/ or /Users/morbus/Sites, for example).
<?
print "<pre>";
// log into our local server using the MySQL root user.
$dbh = mysql_connect( "localhost", "root", "" );
// select the 'test' database created during installation.
mysql_select_db( "test" ) or die ( mysql_error() . "\n" );
print "Connection to the database has been established.\n";
// create a simplistic table.
$table = "CREATE table wisdom (
id int(4) PRIMARY KEY AUTO_INCREMENT,
wisdom char(255), author char(125) );";
$response = mysql_query( $table, $dbh );
if ($response) { print "The table was created correctly!\n"; }
else { print mysql_error () . "\n"; }
// now, we'll add some data to our newly created table.
// to add different wisdom, just change the 'values'.
$insert_data = "INSERT into wisdom ( wisdom, author )
values ( 'Must... remain... awake!', 'Morbus' );";
$response = mysql_query( $insert_data, $dbh );
if ($response) { print "The data was inserted correctly!\n"; }
else { print mysql_error () . "\n"; }
// and read it back for printing purposes.
$get_table_data = "SELECT * FROM wisdom;";
$response = mysql_query( $get_table_data, $dbh );
if ($response) { print "We successfully got all the table data.\n"; }
else { print mysql_error () . "\n"; }
// now print it out for the user.
while ( $one_line_of_data = mysql_fetch_array( $response ) ) {
extract ( $one_line_of_data );
print "#$id: $author sez: \"$wisdom\"\n";
}
print "</pre>";
?>
Note: Again, we're not going to explore the syntax of the PHP script, or the SQL commands that are used. Suffice it to say that this script will create a table in the MySQL 'test' database, add some data, and then spit back the total contents of the 'wisdom' table. If you need a brush-up on PHP or MySQL, be sure to check out ONLamp.com.
After you've saved the file, load it in your Web browser. I saved my copy in /Users/morbus/Sites/test.php, so I loaded http://127.0.0.1/~morbus/test.php in my browser. After the first run, this is what I saw:
Connection to the database has been established.
The table was created correctly!
The data was inserted correctly!
We successfully got all the table data.
#1: Morbus sez: "Must... remain... awake!"
If I continue running the script, changing the INSERT line each time, my output will start to look like:
Connection to the database has been established.
Table 'wisdom' already exists
The data was inserted correctly!
We successfully got all the table data.
#1: Morbus sez: "Must... remain... awake!"
#2: Morbus sez: "Sleeping makes Derrick angry!"
#3: Morbus sez: "And I'm 23 minutes away from 3 o'clock!"
The above output certifies that our PHP-to-MySQL communication is working perfectly. With 23 minutes to spare before the boss and his goons come, we've got just enough time to chow down the last remnants of our ketchup potato chips and wash them down with a swig of Moxie.
Two minor additions
|
Previously in the Series Apache Web-Serving with Mac OS X, Part 6 Apache Web-Serving with Mac OS X, Part 4 Apache Web-Serving with Mac OS X: Part 3 |
When we turn on our Web server (through the Sharing preference panel), OS X will happily restart Apache if our machine ever needs a reboot. Out of the box, MySQL doesn't restart automatically. Thankfully, there's a double-clickable solution, again from Marc Liyanage. Upon installing this StartupItem, MySQL will be at your beck and call after every reboot.
With the above instructions, MySQL is woefully unsecured. Anyone can become the administrative MySQL user and wreak havoc with our data. This may not be an issue if you're using MySQL on a development machine, but publicly accessible servers need protection. Much like OS X has a root user with ultimate control over the machine, MySQL also has a root user that has ultimate control over the database server.
By default, the MySQL root user has no password assigned to it. If you take a gander back at our PHP script, you'll see that we connect to our database with that field blank:
// log into our local server using the MySQL root user.
$dbh = mysql_connect( "localhost", "root", "" );
The simplest step in beginning to secure our database server is to set a password for MySQL's root user. To do so, enter the following in a Terminal:
mysqladmin -u root password new_password_here
Once we do that, we'll have to modify our PHP code as well:
// log into our local server using the MySQL root user.
$dbh = mysql_connect( "localhost", "root", "new_password_here" );
This is just the start of securing a MySQL installation. You can go much deeper, like restricting access to certain databases by host name, much like we restricted access to certain Web directories with Apache's Allow and Deny directives (see "Choosing Who Sees What" in Part 3 of this series).
After the demonstration . . .
Thankfully, the meeting only lasted half an hour. The wide-eyed wonder boys have left and the redheaded stepchildren have wandered off. You're sitting, once again, with a smug look on your face, complemented by the realization that worrying about job security is a thing of the past. (Just be careful of netslavery.)
You've got databases stored, features adored, and requests explored [1]. Yet you realize there's so much more to Apache lurking beneath the surface, yelling out, "Discover me!" with a glee normally unfounded in typical Mac software. Where would you like to be taken next?
[1] Along with the bosses abhorred, benefits scored, and welcome awards, mouths floored and derision ignored, nothing deplored and happiness poured, computer love has been restored, and with no principles discord! Hail the mighty Fnord! (Yes, I could go on.)
Kevin Hemenway is the coauthor of Mac OS X Hacks, author of Spidering Hacks, and the alter ego of the pervasively strange Morbus Iff, creator of disobey.com, which bills itself as "content for the discontented."
Return to the Mac DevCenter.
You must be logged in to the O'Reilly Network to post a talkback.
Showing messages 1 through 193 of 193.
-
Just to add
2006-08-19 19:52:09 JeremyGee [Reply | View]
-
mysql socket problem
2006-06-22 07:51:14 carlco2 [Reply | View]
im getting the error
Warning: mysql_connect(): Can't connect to local MySQL server through socket '/var/mysql/mysql.sock' (2) in /Library/WebServer/Documents/sqlaccess.php on line 5
Warning: mysql_select_db(): Can't connect to local MySQL server through socket '/var/mysql/mysql.sock' (2) in /Library/WebServer/Documents/sqlaccess.php on line 9
Warning: mysql_select_db(): A link to the server could not be established in /Library/WebServer/Documents/sqlaccess.php on line 9
Can't connect to local MySQL server through socket '/var/mysql/mysql.sock' (2)
i can access mysql with cocoamysql and through phpmyadmin no problem i have mysql-standard-4.1.12-apple-darwin7.9.0-powerpc installed and aliased as mysql, tried sudo chown but still no joy accessing from apache webserver can someone shed some light? many thanks -
mysql socket problem - solved differently
2009-08-23 07:27:49 ekklisis [Reply | View]
After spending a few hours on the console, without knowing much about how to use it, I realized that some of the links provided in the above article were not working in my ibook, because the installation path is different. So I decided to write a simple complement for those who might encounter the same problems.
First of all, Mark Liyanage's double-clickable MySQL page sent me to the following link, which asked me to register.
http://dev.mysql.com/get/Downloads/MySQL-4.1/mysql-standard-4.1.22-apple-darwin8.6.0-powerpc.dmg/from/pick
Of course I didn't register, so I googled for a mirror of the file to be downloaded:
mysql-standard-4.1.22-apple-darwin8.6.0-powerpc.dmg
The particular package contains a startup item, which I also installed for restarting the MySQL server every time I restart my computer.
After installation I was supposed to say hello to MySQL, as Kevin's article suggests, but I got the above-mentioned frustrating, yet stupid error.
The solution:
We open a command shell.
we change dir to /private/etc with the command:
cd /private/etc
We copy the file php.ini.default to a writable directory in order to be able to edit it. (chmod did not work in my case). I used the commands:
cd /
sudo cp php.ini.default /private/etc/php.ini.default
Then I opened it with the pico text editor:
pico php.ini.default
I hit ctrl+W to find mysql.default_socket =
and I changed it to:
mysql.default_socket = /private/temp/mysql.sock
Ctrl+O to save
and
Ctrl+X to exit the editor.
Then to put the file back in its place:
sudo mv php.ini.default /private/etc/php.ini.default
(Of course it asked whether I wanted to overwrite the old file and I said yes.) Unfortunately I don't remember whether it needs a chmod +w so, you'll have to figure it out yourself.
Then I followed the advice of our fellow user carlco2 posted at his comment "Mysql socket problem solved.. OSX10.4 2006-06-23 04:59:13"
sudo mkdir /var/mysql
sudo ln -s /tmp/mysql.sock /var/mysql/mysql.sock
I then restarted and wow! MySQL server did not only start automatically, but also php and MySQL could meet each other, enabling me to finally run Kevin's "test.php" and excitedly say hello to MySQL ;)
I will be happy if my blah blah becomes of some help to someone.
Thanks for reading! -
mysql socket problem solved.. OSX10.4
2006-06-23 04:59:13 carlco2 [Reply | View]
After updating to Mac OS X 10.4.4, you may find that the connection between PHP and MySQL running on your local webserver is broken.
Apparently the socket file got moved in the update. You can make it start working again by entering the following commands in a Terminal window:
$ sudo mkdir /var/mysql
$ sudo ln -s /tmp/mysql.sock /var/mysql/mysql.sock
http://www.macosxhints.com/article.php?story=20060111113313511 -
ignore last entry!
2006-06-23 05:35:31 carlco2 [Reply | View]
The reason you must not use /tmp/mysql.sock is that any Tom, Dick or Other can simply delete it and bring your php-mysql system down.
The fix is actually simple:
sudo mkdir -p /var/mysql
sudo chgrp mysql /var/mysql
sudo chmog g+w /var/mysql
edit/create /private/etc/my.cnf and add the line:
socket=/var/mysql/mysql.sock
restart mysql
now the new php wil find the socket info in the right place, if you change php then you might need to tell that about the new secure location.
http://www.macosxhints.com/article.php?story=20060111113313511 -
ignore last entry!
2007-01-23 19:42:33 bobga [Reply | View]
in the my.cnf (mine is in /etc/my.cnf) file you need two sections to contain the socket directive
[client]
socket=/var/mysql/mysql.sock
[mysql]
socket=/var/mysql/mysql.sock
Without both of them you are pointing to different sockets (with the server (mysql) mysqld and the client (client) mysql and mysqladmin apps)
It may be better just to copy one of the sample cnf files from /usr/local/mysql/support-files. Copy one of the samples (i used my-small.cnf as it's just for my home web server) to /etc/my.cnf and edit as needed (i.e. change /tmp/mysql.sock to /var/mysql/mysql.sock)
Good luck,
s-
-
Several questions about mysql with OSX 10.3.9
2006-01-30 10:21:40 musicvideo [Reply | View]
- My install of mysql is not in the directory everyone else on the forum is referring and I don't know why (I am relatively new to OSX)
The installer did not prompt me to select the destination directory.
the mysql directory is in Macintosh HD/Users/john/Desktop.
I get the error message Can't connect to local MySQL server through socket '/tmp/mysql.sock' (2) . I have not changed the admin password and I am logged in as an admin to OSX. I modified the php.ini.default file to include a path to the aforementioned directory, and saved the file as php.ini back out to the same directory where the php.ini.default was located. Also, the subfolder underneath mysql has the number "386" in the directory title - that makes me nervous.
I have 10.3.9 client version of OSX, and Perl 5.8.7.
Any solutions out there? I have been going around in circles all weekend and now it's already monday, and I'm still at ground zero. Any help would be greatly appreciated.
Thanks in advance
John
-
Start and stop MySQL in witch program?
2005-12-09 01:16:30 NewMacUser [Reply | View]
1. Do I have to start and stop the mysql server when I want to use it?
1.2. How do I do this, and from where/in witch program? Terminal?
I have installed the start up icon.
I know this question have been answeared before, but I need to get it in with a spoon! :-)
And I'm very unsure about witch program I shoud use.
Thanks! And by the way, good articles!
-
MySQL root user password explaination
2004-10-16 23:40:42 joe@collabornet.org [Reply | View]
All of the advice on this board had been handy and this question recurs a lot...heres how I managed to change the root user password
I got the root user setup on mysql to work by punching in the password for my root level password on my iBook. For some reason it automatically had the password set to this. So when I typed
mysqladmin -u root -p password 'bla'
at the command line it asked
Password:
and heres where I entered my root level password for my iBook and thus changed the MySQL root password to 'bla'
it worked for me...
the connection string in php then becomes:
$dbh = mysql_connect( "localhost", "root", "bla" ) or die("not happening");
-
mysqld ended
2004-07-26 19:38:00 mel_david [Reply | View]
Hi to all following these tutorials!
I initially had problems with my MySQL 4.0.20 installation where I would get errors like "Can't connect to local MySQL server through socket '/tmp/mysql.sock' (2)" or "040727 08:45:57 mysqld ended"
I found out that it was the MySQLStartItem that was at fault. Don't use the one that comes with 4.0.20.
Instead you should use Marc Liyanage's older version: http://www2.entropy.ch/download/mysql-startupitem.pkg.tar.gz
When I installed that one, everything worked fine and I could restart the machine and MySQL would start up automatcially just fine.
Of course if everything worked out for you then that's great and you can just ignore this post. Btw, I'm on Jaguar on a DP-500MHZ G4. Cheers.
-
mySQL install file permissions
2004-07-17 11:53:56 cactusman [Reply | View]
I'm attempting to install mySQL from source on Mac OS X. /usr/local persmissions indicate only root has write permission. The instructions have several steps shown as if the administrative account is installing into /usr/local without using sudo. I'm missing something because my administrative account will not allow me to write to /usr/local because of the permissions of root. drwxr-xr-x 3 root wheel 102 17 Jul 11:28 .
-
tcsh modification...
2004-05-27 22:15:34 Durer [Reply | View]
with mysql installation many advise editing tcshrc file or if i dont have it to create one, but nobody tells u HOW to do it.
would be nice to know. -
tcsh modification...
2004-06-26 14:21:50 eepalmer [Reply | View]
If you are using tcsh (bash is now the default) you can do one of many things.
1 - go as root and change the main one for you machine - BAD
2 - make a .tcshrc or .cshrc file in your home directory where you add the lines you need (e.g. path, alias, etc)
And finally, the one that worked well under 10.1 and should still work...
3 - create an init directory with files as needed
a - create the path ~/Library/init/tcsh (you create init and tcsh)
b - make the following files if needed
aliases.mine
login.mine
environment.mine
path
-
Easy MySQL Install
2003-11-05 17:24:33 anonymous2 [Reply | View]
MySQL.com now has package installers for Mac OSX here:
http://www.mysql.com/downloads/index.html
This makes installing MySQL on OS X a snap. Just remember to read the ReadMe file that comes with it.
-
RE: mysql admin
2003-09-15 14:14:06 anonymous2 [Reply | View]
When I type in mysqladmin terminal says
"command not found"
How can I find this utility or install it?
-
RE: mysql admin
2003-09-15 19:06:35 anonymous2 [Reply | View]
Once again with persistence I succeeded!
It turned out to be the path. Here is the info I found from the User's guide:
You should now be able to connect to the MySQL server, e.g. by running `/usr/local/mysql/bin/mysql'.
If you installed MySQL for the first time, please remember to set a password for the MySQL root user!
This is done with the following two commands:
/usr/local/mysql/bin/mysqladmin -u root password <password>
/usr/local/mysql/bin/mysqladmin -u root -h `hostname` password <password>
So, I found the mysqladmin in the bin folder...
Yeehaa!!!!
You might want to also add aliases to your shell's resource file to access mysql and mysqladmin from the command-line:
-
password?
2003-08-06 16:20:53 forgotmyscript [Reply | View]
I have read all of the messages. There seams to be some that have problems with the password, as do I. I could not find an answer. So I will ask once more for us all. (the ones having problems with the password) I have mysql up and running. I cannot set the password. I have tried the sudo mysqladmin -u root password (password)
also -u root -p tried all the help I could find. Just says command not found. When I start up into mysql it does not ask for a password anytime either. So I know there is not one. Also, I could not get the test.php to work. I get a 404 file not found error. Maybe that will help. Could be all symptoms to same problem.
-
Success ... then Disaster
2003-07-28 15:28:35 anonymous2 [Reply | View]
Followed the tutorials, installed cgi, ssi, php and mySQL. All worked a treat. Then I installed the double clickable startup package for mySQL. Naturally I closed the machine down and started it up again to see if it worked. And now nothing works!! In System Preferences Personal Web Sharing was unclicked. How did that happen. worse still on clicking it, it says Web sharing is starting up ... but it never does. Any ideas? Please.
Graham J.
-
osX 10.1
2003-07-22 05:00:17 anonymous2 [Reply | View]
does anyone have any idea how it still would be possible to install mysql on 10.1?
(everything I can find is either for 10.2 or gone to a better place, help!)
any hint would be greatly appreciated
THANKS!
regula
-
weird stuff!!!
2003-05-14 06:41:59 anonymous2 [Reply | View]
I have today installed and configured apache, php, shtml, phpmyadmin, mysql, tomcat and everything was working like a charm (I thought). I made accounts and set it up so that only I and a friend of mine could log in on our sites and edit them and stuff....he got his own account and I had mine....well...ofcourse for a real newbie as I am I was jumping in the air and waving my hands and I was telling everybody how great I am (newbie stuff....).
Ofcourse....this didn't take a long time...I restarted again the apache server for the last time just to see if everything would still work (and they all really did before!) and I just wanted to restart my computer also....and now the socket thing of the mysql is wrong in some way.
I pico'ed the error file in the mysql/data and as expected there was something wrong with the port number.....OR I had 2 mysql's running sort of.
Now I found that in my /usr/local/ there is a mysql but also in the /Library/MySQL....what is this last one? How did it get there? I'm kindof sure that I didn't put it there...could that be the problem?
Hope someone can help...or maybe I could just change the port of the mysql database....but how?
I know most people would say....just remove everything and try again....but I can't I also have my normal work that I gotta do so I'm doing this in every second that I have some spare time...and to remove everything...well...then it would be safer to format my computer and install a fresh OS again...I guess....
Long story...sorry....help me!
TNX!
Skee-Tone -
weird stuff!!!
2003-06-13 06:52:36 anonymous2 [Reply | View]
never mind...I was running 2 mysql servers on my computer (had some probs installing the first one)...so that was the cause.
guess I don't have to thank anybody this time =) -
weird stuff!!!
2005-01-09 08:13:12 frustrated [Reply | View]
I am having mysql install issues listed below
1. does not autostart with startup item package
2. After manual start, can only open database once as if mysql daemon is not running after one try.
3. I can not see mysql daemon running in darwin shell with PS command ?????
Something must be wrong with my mysql installation or my version of mysql.
-
To deal with the password issue..
2003-05-05 15:54:00 macbuff [Reply | View]
To set the password initially and to correctly use mysqladmin everytime try this:
mysqladmin -u root -p
When 'Enter password:' just enter the password.
-
Having problems with Sockets? Read THIS to fix
2003-03-26 10:10:43 anonymous2 [Reply | View]
http://www.entropy.ch/software/macosx/mysql/
this was mentioned by someone below. I am reposting it again.
If you get an error saying you cannot connect to socket or other such error. Go to the link above and follow the steps for OS 10.2.
They work. This fixed me right up!
W00T!
-
mySQL up BUT...
2003-02-06 11:15:43 anonymous2 [Reply | View]
mySQL is up, the test page works fine, but when I try to get to the mysql client to create a new database (or do anything) I get this error...
joe% sudo ./bin/mysql
Password:
dyld: ./bin/mysql Undefined symbols:
./bin/mysql undefined reference to _BC expected to be defined in /usr/lib/libSystem.B.dylib
./bin/mysql undefined reference to _PC expected to be defined in /usr/lib/libSystem.B.dylib
./bin/mysql undefined reference to _UP expected to be defined in /usr/lib/libSystem.B.dylib
Trace/BPT trap
Is something not installed properly, or am I (be nice) just a goofy-guss and missing something?
Thanks,
Joe
-
mod_auth_mysql
2003-01-09 16:48:26 anonymous2 [Reply | View]
I am looking for someone who has been able to get the mod_auth_mysql to work with apache, anyone, anyone?
-
Nice series of articles. Thanks!
2002-12-21 08:49:14 anonymous2 [Reply | View]
Thanks to O'Reilly and Mr. Hemenway for creating and publishing this outstanding series of articles. Well Done!
-
change MySQL password in 10.2 ??
2002-12-01 11:36:32 anonymous2 [Reply | View]
I had several of the problems reported in the previous comments. The socket problem and starting db problem I fixed by going to
http://www.entropy.ch/software/macosx/mysql/
and following the 10.2 procedure
except...when I got to the password section and entered the command into terminal, I got command not found.
It may be my syntax or path that is wrong. I am a newbie at both database and terminal. The fact that I have My SQL running and connected to Your SQL (no password) in only a few hours is amazing. Evidently the tutorial/ article is pretty good. :)
Thanks to Kevin H. and O Reilly
Any help with the password problem would be greatly appreciated. TIA
steve edge/ atlanta -
change MySQL password in 10.2 ??
2003-11-14 16:19:23 anonymous2 [Reply | View]
I've found a solution to change password problem.
First - if you specify a new user then by default the server name for this new user is by default '%' which should mean 'any' but doesn't work with 'localhost', so if you need to work with server at 'localhost' you need to create user for this server. This means that on the end I have two users in my 'mysql.user' table.
User1: user_name@%
User2: user_name@localhost
In such a configuration the second user is used and is working correctly.
The other problem is that SQL statement from manual for password change didn't work for me:
UPDATE user SET Password=PASSWORD('123') WHERE user='user_name';
I've found a second way to do it:
set password for user_name@localhost = password('123');
And it looks that the second statement works better.
PiotrL -
password problem - just do the following...
2002-12-10 18:20:37 tronje [Reply | View]
type in the line like this:
/usr/local/bin/mysqladmin -u root password ...(here comes your password)
that's it. -
didn't work for me...
2002-12-23 16:38:00 csteinfield [Reply | View]
I had the same problem, and was not sure if a password ever got set. I don't think so because it lets me enter the MySQL monitor without typing a password. I have tried typing:
/usr/local/bin/mysqladmin -u root password newpassword
and I get the following:
./bin/mysqladmin: connect to server at 'localhost' failed
error: 'Access denied for user: 'root@localhost' (Using password: NO)'
An earlier post said that this command needed to be preceded with a sudo, so I tried the following:
su /usr/local/bin/mysqladmin -u root password newpassword
and then when prompted enter my normal login password (I am the admin user).
I then get the following error:
su: Sorry
Any idea what is going on? Thanks. -
didn't work for me...
2004-10-16 23:26:47 joe@collabornet.org [Reply | View]
Yep same exact problem going here with me as well. One quick and dirty way to connect to the MySQL server though is to modify the PHP script to
$dbh = mysql_connect( "localhost", "localhost", "" ) or die("not happening");
INSTEAD OF
$dbh = mysql_connect( "localhost", "root", "" ) or die("not happening");
Of course this doesn't address the core of the issue--setting the mysql root password however, it does allow you to play with php & mysql a bit.
If your setup is purely for testing purposes only than having your system securely locked down perfect is a secondary issue. The more important thing is being able to check your code to ensure it works locally before uploading to the real web server where it matters.
-
no users within phpmyadmn
2002-12-01 04:12:45 anonymous2 [Reply | View]
I deleted the root user by mistake. I can still login but can't create new database and when click on user, the pages says no user(s) found. Can anyone help? thanks.
I am on Mac 10.2.2 Apache 1.3.26, and mysql 3.23.29 on the localhost.
-
Cannot Connect to mysql.sock
2002-11-20 20:10:39 anonymous2 [Reply | View]
If you're having this problem (which I was for days and even after several removal/re-installs) I have seemingly found a solution that corrects the problem.
I ended up making a php.ini file located in /usr/local/lib/ that specifies where the mysql.sock is. I found out that the sockt (at least on my machine) was running in /tmp/mysql.sock
So I configured the php.ini to read as follows:
mysql.default_socket = /tmp/mysql.sock
And voila. Hope this helps.
-
Need to uninstall MySQL
2002-11-14 03:22:21 nrussell23 [Reply | View]
I tried to install from the source code and couldn't get farther than the "make" command where all I got was "make: *** No targets specified and no makefile found. Stop." Maybe MySQL is actually running. Who knows? All I can get is "Can't connect to local MySQL server through socket '/tmp/mysql.sock' (2)"
I'd like to uninstall it and start from scratch. Does anybody know how to do this?
Thanks
-
Access denied when creating a new DB
2002-11-08 16:01:38 anonymous2 [Reply | View]
Here is the question.
When I created a new DB via a text file the DB was created fine but when I actually started up MySQL and issued USE DATABASE "dbname" I was unable to access it (permission denied).
Any suggestions?
Thanks
Thomas
-
PHP required a trick
2002-10-16 10:51:03 anonymous2 [Reply | View]
I could not get PHP for the longest time, and got an error about not finding the mysql socket, as did another user who commented on this list. This is how I solved it.
I got a php.ini file from a PHP installation on the Web. (It seems OS X doesn't come with one.) If you know a friend who has one, borrow his or hers.
I put the php.ini file in /usr/local/lib. I then searched for the line mysql.default_socket and set it to this:
mysql.default_socket = /usr/local/mysql/run/mysql_socket
My MySQL installation houses its socket there. (I had installed it from the instructions at Apple's Internet Developer site.)
If I remember correctly, that was all there was to it. PHP could access MySQL after that :-)
Good luck!
-
Write update of articles for Mac OS 10.2
2002-10-10 13:28:10 anonymous2 [Reply | View]
Please write an update to these Perl articles for Mac OS 10.2 -- at least for the turning on of the CGI activity. I'm sure there are others who would appreciate the update.
I used the CGI activity on OS 9, but have not tried it on OS X yet.
Thanks for what you have done and thanks for considering the update.
-
chown -R mysql /usr/local/mysql
2002-10-09 13:35:29 anonymous2 [Reply | View]
This line isn't the same as those from the package install page.
chown -R mysql /usr/local/mysql/*
is what is should be. I'm using 10.2 and running the above line got mysql to run.
-
if using 10.2 ...
2002-09-30 20:15:29 anonymous2 [Reply | View]
Regarding post below... with 10.2 I had the same problem of mysql user already existing. I suggest following the instructions here:
http://www.entropy.ch/software/macosx/mysql/
I got it to work doing these and then going back to the post installation clean-up section of this article.
-
MySQL User
2002-09-29 00:33:25 anonymous2 [Reply | View]
I'm ruunig OS X 10.2.1. When I try to create a MySQL User account, I get this message that this account already exists eventhough it doesn't appear in the accounts list, and I'm sure I haven't created this account (this is a brand new machine.) Any idea why this is, and how I should proceed installing MySQL?
Thanks.
-
MySQL User
2002-11-15 06:03:58 jumpingjokes [Reply | View]
I have exactly the same Problem. Has anybody found a solution for that? -
MySQL User
2003-06-17 10:57:04 anonymous2 [Reply | View]
I had the same problem--had never created a 'mysql' account and was mystified when the computer told me the account already existed. But somehow, probably during installation, the account is created by the computer behind the scenes. To check this, go to NetInfo Manager (in Utilities), and click on the "Users" field. You should see mysql there, along with some others you didn't know you had, like "nobody", "root", and "www".
So it doesn't actually need to be created. You might have to do something with it in NetInfo Manager, but I can't remember.
cheers,
Cory Forsyth
cforsyth@pomona.edu -
MySQL User
2003-11-05 15:58:58 anonymous2 [Reply | View]
The solution is to delete the existing mysql user through netinfo, then create a new mysql user in system prefrences. Here are the details:
http://www.golivein24.com/tips/dynamic_content/05_jaguar_fix.html -
MySQL User
2005-02-28 15:29:18 turbo-gi [Reply | View]
I just did what they suggested at golive6...
I deleted the mysql account .... till now everything was fine..
BUT.. then I wanted to create the new sql account...
and now Symstem tells me that I can´t create a mysql account because the name mysql is not available...
Anybody any idea???
This drives me crazy... -
MySQL User
2005-06-04 19:58:34 pgold01 [Reply | View]
the existing mysql user only needs to be removed and recreated for OSX 10.1. 10.2 ships with a default mysql user installed (which is why one would be unable to create a new one). This step in the MySQL setup is no longer necessary.
Just making a note as i hit the same problem and the posts didn't really resolve my initial questions (as they are pre-10.2).
-
need sudo to run mysqladmin?
2002-09-18 07:05:54 anonymous2 [Reply | View]
Good article - the version of the packaged mysql is now different and the main link to it is dead.
One other note: I couldn't run the mysqladmin program unless I preceded it by sudo. This is missing from the article...
-
make (link) unresolved symbols: _tgetflag, etc. in client/
2002-09-12 11:53:41 anonymous2 [Reply | View]
Following exactly the procedure in this article, on OS X 10.2, with the July 2002 developer install, I was getting a link error from the mysql make: couldn't find several termcap functions, like tgetflag, etc.
I fixed it by changing the LDADD line in /client/Makefile to this: (added the termcap library):
LDADD = ../libmysql/libmysqlclient.la /usr/lib/libtermcap.dylib
Anyone know where those symbols are SUPPOSED to be for the usual build?
Thanks!
Ed Smith, Portland, Oregon
-
mysqld ended...waaahhh
2002-08-30 18:45:33 elroysf [Reply | View]
OK, here's the deal:
sudo ./bin/safe_mysqld --user=mysql &
"Starting mysqld daemon with databases from /usr/local/mysql/data"
"mysqld ended"
bummer.
any ideas? -
mysqld ended...waaahhh
2003-12-15 06:01:03 anonymous2 [Reply | View]
To me it was enough the chown command..
anyway thanx a lot i was getting crazy with it!!!
Bye Massimo -
mysqld ended...waaahhh
2003-06-13 12:57:35 anonymous2 [Reply | View]
This is probably it:
The databases installed in the mysql data directory, /var/lib/mysql are not owned by the
mysql user, but by the user who ran
mysql_install_db. chown them to mysql and chgrp
them to the appropriate group e.g.
chown -R mysql /var/lib/mysql/mysql
chgrp -R daemons /var/lib/mysql/mysql
-
mysqld ended...waaahhh
2008-02-09 14:56:25 sriv1211 [Reply | View]
to that anonymous2 guy:
thanks so much for that comment - i've been trying for days literally to find out the reason. i know that u posted the comment in 2003, and its now 2008, u may never read this post again, but thanks so much for that simple sollution!!!!!
-
Install Error That Won't Go Away!! Please Help!!
2002-08-21 19:20:52 hembeck [Reply | View]
Does anyone know what is causing this error and how to correct the problem?
ERROR: 1062 Duplicate entry 'localhost-root' for key 1
I've followed the steps outlined here VERY CAREFULLY as well as Marc Liyanage's instructions which accompany his installer .pkg.
I've removed the installation several times and have deleted and created the MySQL User several times as well, but I keep getting this error, which just craps out everything.
Please advise. I've spent three days on this thing and have read documentation from all over the place. I lost and very tired of this.
Thanks,
Fernando
P.S. OS 10.1.5, MySQL 3.23.51
-
Manual Shutdown & Startup commands, for dummies
2002-08-21 10:51:09 hembeck [Reply | View]
Hey all,
Been looking over the offical mysql documentation, but I'm too much of a UNIX/command line newbie that's it just goes over my head. Sooo...Can someone spell out how does one manually shutdown and start up mysql? I jus get permission errors when I try what's in the user guide.
Thank you very much!
-Fernando
-
uninstall MySQL
2002-08-14 08:17:48 smackcell [Reply | View]
I got a little overstimulated because of my success with PHP, and screwed up:
I neglected to create a mysqluser, and installed MySQL (pkg) in a user directory.
I'd like to undo this screwup before continuing. (Uninstall... then create mysqluser and reinstall...) Does anyone know how to do this? -
uninstall MySQL: obvious answer???
2002-08-14 10:53:45 smackcell [Reply | View]
I went back to the site where I got the package...
Marc Liyanage - Software - Mac OS X Packages - MySQL
looked around, and found cleanup instructions:
http://www.entropy.ch/software/macosx/mysql/remove-old-mysql.html
Will probably go ahead and try this.
-
PLEASE HELP!! Permissions again: Bind on unix
2002-08-03 09:56:07 macmad [Reply | View]
020803 18:47:09 mysqld started
020803 18:47:09 Can't start server : Bind on unix socket: Permission denied
020803 18:47:09 Do you already have another mysqld server running on socket: /tmp/mysql.sock ?
020803 18:47:09 Aborting
I'm sure its something simple but I've been going round in circles for hours - and I REALLY want/need to get this working. Please, offer me any help you can! -
PLEASE HELP!! Permissions again: Bind on unix
2002-08-16 13:20:15 pathell [Reply | View]
hi,
something like that append to me
check the "local/mysql/data/ localhost.err" file
If you have someting like :
020816 17:41:42 mysqld ended
020816 17:44:55 mysqld started
020816 17:44:55 Can't start server: Bind on TCP/IP port: Address already in use
020816 17:44:55 Do you already have another mysqld server running on port: 33
There is chance than mysql is already running.
Quit the user session (i don't know how to stop mysql)
start again
chech than the mysql user has admin access
hope it will be useful
you better goto to : http://www.entropy.ch/software/macosx/mysql/welcome.html.
I have found a lot of things
forgive me for my poor English
Patrick Helle
-
errors when trying to create DB...
2002-07-28 08:49:44 ferrit [Reply | View]
Hi,
When I tried to run the 'test.php' script I got this...
Connection to the database has been established.
Can't create/write to file './test/wisdom.frm' (Errcode: 13)
Table 'test.wisdom' doesn't exist
Table 'test.wisdom' doesn't exist
Warning: mysql_fetch_array(): supplied argument is not a valid MySQL result resource in /Library/WebServer/Documents/MySQL_test.php on line 41
Any ideas ???
Jon
-
Can't login to mysql server
2002-07-25 07:48:18 besrouchon [Reply | View]
ERROR 2002: Can't connect to local MySQL server through socket '/tmp/mysql.sock' (2)
I have the exact same configurations on 2 different G4s and one won't connect to mysql.
Any ideas ??
Cheers -
Can't login to mysql server
2003-04-14 13:22:31 anonymous2 [Reply | View]
Hello,
Compare your mysql user settings via netinfo.
If they are differents try the installation procedure from phpmac web site.
I had the same problem, and now I have a happy mac !
http://www.phpmac.com/articles/view.php?id=41
A French mac lover
-
Thanks!
2002-07-18 04:13:11 greenpeanut [Reply | View]
This is directed to Bill, who posted that great tip. That helped me out a lot, it fixed the "sock" error, where the MySQL DB won't connect.
Thanks again
-
test.php does not work
2002-07-13 04:45:17 thegws [Reply | View]
When I do the 'Post-installation wrap up' and enter the following into Terminal:
cd /usr/local/mysql/
sudo ./scripts/mysql_install_db
sudo chown -R mysql /usr/local/mysql
sudo ./bin/safe_mysqld --user=mysql &
it returns two lines that say:
Starting mysqld daemon with databases from /usr/local/mysql/data
020713 04:34:16 mysqld ended
Then when I do the next step of creating test.php and try to load it in my browser, it returns the following:
Warning: Can't connect to local MySQL server through socket '/Private/tmp/mysql.sock' (61) in /Library/WebServer/Documents/test.php on line 5
Warning: MySQL Connection Failed: Can't connect to local MySQL server through socket '/Private/tmp/mysql.sock' (61)
in /Library/WebServer/Documents/test.php on line 5
Warning: Can't connect to local MySQL server through socket '/Private/tmp/mysql.sock' (61) in /Library/WebServer/Documents/test.php on line 9
Warning: MySQL Connection Failed: Can't connect to local MySQL server through socket '/Private/tmp/mysql.sock' (61)
in /Library/WebServer/Documents/test.php on line 9
Warning: MySQL: A link to the server could not be established in /Library/WebServer/Documents/test.php on line 9
Can't connect to local MySQL server through socket '/Private/tmp/mysql.sock' (61)
Can anyone help?
-
test.php does not work
2004-01-04 13:32:46 anonymous2 [Reply | View]
I just had the same problem when installing phpmyadmin.
I'm using OSX-Panther 10.3.2,
fink installed mysql & entropy.ch php package.
I'm not sure where this happens (guessing the fink build of mysql) ..
but, in any case, php is using the default path to the mysql
socket to connect, which is for us /Private/tmp/mysql.sock
I believe, but my memory is fuzzy, that in 10.2 there was
a /Private.
now it is /private.
If you look in your php.ini file and change (or add?)
the line mysql.default_socket = /private/tmp/mysql.sock
(or wherever mysql is writing a socket on your host machine)
and restart apache / php , it should work.
-
test.php does not work
2003-08-28 18:13:55 anonymous2 [Reply | View]
ERROR 2002: Can't connect to local MySQL server through socket '/tmp/mysql.sock' (61)
[1] + Done sudo ./bin/safe_mysqld --user=mysql
I tried to connect but failed. Can anyone tell me how to fix this? It's a real pain!!! -
test.php does not work
2002-07-23 23:17:01 macaddict [Reply | View]
There are two things that can help. First, make sure that the chown command looks like:
sudo chown -R mysql /usr/local/mysql/*
or if you are already in that directory, you can also try
sudo chown -R mysql .
Make sure you list the directory (ls -al /usr/local/mysql) to ensure the chown command actually worked.
For those who had trouble starting up the mysql daemon, first type "su", then enter your root password at the prompt. This will log you into the shell as root, and from that point on you don't need to type "sudo" to run a command that needs to run as root. Just make sure you exit the root session when you are done by typing "exit", otherwise every command afterwards will run with root priviledges, a good way to shoot yourself in the foot. At that point you can type "/usr/local/bin/mysql_safe --user=mysql &" and it should work as advertised. -
test.php does not work
2002-07-19 12:38:10 placebo [Reply | View]
try this first and see if it works:
turn your "web sharing" under the 'sharing' system preferences. it isn't as obvious as it should be but your computer is trying to reach itself and cannot connect because sharing is off. -
test.php does not work
2002-07-19 20:22:40 placebo [Reply | View]
...then try this:
make sure the <password> is left blank in this line in the test.php file...
// log into our local server using the MySQL root user.
$dbh = mysql_connect( "localhost", "root", "<password>" );
...would read:
// log into our local server using the MySQL root user.
$dbh = mysql_connect( "localhost", "root", "" );
i am having the same problem---as some people here are having here---in setting a mysql root password.
-
What am I doing wrong?
2002-07-11 20:41:17 gregsixx [Reply | View]
I downloaded the pkg for install and everything went just fine, until I got to the database initializations. Specifically, the follwoing: sudo chown -R mysql /usr/local/mysql I've tried the variations that seem to have worked for others on these posts, but I'm having a different problem. I get the error:
sudo: chown: command not found
I've been using the bash shell, so I thought that maybe there was a problem there, but I got the exact same error when I went back to the default shell.
By the way, even though I've had problems, these tutorials are great. I've learned a lot.
So... any help? -
Success - sort of
2002-07-11 21:13:22 gregsixx [Reply | View]
Hope this helps someone else. I noticed that I was having the same errorcode 13 as someone who posted earlier. I logged out and back in as the mySQL user and ran through the sudos once again and everything worked.
Next I logged out and back in as another user and the test script worked.
I rebooted, and logged in again as a non-mySQL user, and tried to run the last sudo command to start the server, but got the same problem as before.
Would this go away if I downloaded and ran the StartupItem script? -
Okay, I think I've got it now
2002-07-17 22:23:03 gregsixx [Reply | View]
Once again, I hope this helps out someone else as I've seen similar problems mentioned below.
I found that I could only start and run the mySQL server if I was logged in as the mySQL user. I was having problems with the chown statement. If I logged out, then back in again everything would work, but if I shutdown first, then logged in as a user other than the mySQL user I was back at square one.
To fix the problem I logged back in as the mySQL user, started up the mySQL server, logged out and back in again as another user, downloaded and ran Lyniage's StartupItem package, and everything has worked just fine since.
Hope this helps someone.
-
Uninstall MySQL
2002-07-01 01:41:35 axiomcreativesystems [Reply | View]
O.K.
So I've played about, moved and deleted hidden files, and been generally a bit of a ninny.
So how can I complete uninstall and erase mySQL please?
-
Can't start server: Bind on TCP/IP port: Address already in use
2002-06-30 03:25:38 mrx1 [Reply | View]
OS X Client 10.1.5 with default Apache/PHP installed (and working)
MySQL: mysql-3.23.49.pkg from Marc Liyanage.
First of, I’m a total newbie in this stuff, so please be nice to me! :)
The install seems fairly straight forward and the instructions are clear BUT:
After installing the package, when I try runnig the “sudo ./scripts/mysql_install_db” I get this:
Password:
Preparing db table
Preparing host table
Preparing user table
Preparing func table
Preparing tables_priv table
Preparing columns_priv table
Installing all prepared tables
ERROR: 1062 Duplicate entry 'localhost-root' for key 1
ERROR: 1062 Duplicate entry 'localhost-root' for key 1
020630 9:50:49 ./bin/mysqld: Shutdown Complete
This ERROR thing at the end doesn’t look too good but I don’t give up! I still follow the instructions and change the owner with “chown” etc...: Then, when I run the “mysql test” I get this:
ERROR 2002: Can't connect to local MySQL server through socket '/tmp/mysql.sock' (2)
To try to get a clue on what’s going on, I look at the error log:
[localhost:local/mysql/data] dabest% tail localhost.err
020630 09:59:04 mysqld started
020630 9:59:04 Can't start server: Bind on TCP/IP port: Address already in use
020630 9:59:04 Do you already have another mysqld server running on port: 3306 ?
020630 9:59:04 Aborting
020630 9:59:04 /usr/local/mysql/bin/mysqld: Shutdown Complete
020630 09:59:04 mysqld ended
OK, this error log looks pretty consistant with the ERROR from the install (although the author says lower that it's a message that can be ignored, I just mention it in case). BUT, as I said, I’m just trying to follow the instructions and I have no idea how to fix that or what it means. Looks like I got twice the same thing but that’s the first time I try installing MySQL and I’m not on OSX Server so I don’t think it comes pre-installed... I don’t know how to check what’s using this “TCP/IP port” and even if I did, I wouldn’t know what to do about it...
What to do? Help anyone? Thanks! -
Can't start server: Bind on TCP/IP port: Address already in use
2002-07-12 09:52:02 sdpalmer [Reply | View]
This has been exactly my problem too and I can't figure out what to do either. Any help would be greatly appreciated, please. Thanks. -
Can't start server: Bind on TCP/IP port: Address already in use
2002-07-19 20:28:54 placebo [Reply | View]
out of frustration, i deleted the mysql user account and started a fresh one. this seemed to work for me. i didn't get the error anymore.
make sure you follow the installation procedure by marc liyanage closely the next time around.
i also got rid of third party gui apps that i had installed to make the process easier. it didn't.
so, i'm not sure exactly which action got rid of the error, but it did.
-
Can't start server: Bind on TCP/IP port: Address already in use
2002-06-30 03:24:47 mrx1 [Reply | View]
OS X Client 10.1.5 with default Apache/PHP installed (and working)
MySQL: mysql-3.23.49.pkg from Marc Liyanage.
First of, I’m a total newbie in this stuff, so please be nice to me! :)
The install seems fairly straight forward and the instructions are clear BUT:
After installing the package, when I try runnig the “sudo ./scripts/mysql_install_db” I get this:
Password:
Preparing db table
Preparing host table
Preparing user table
Preparing func table
Preparing tables_priv table
Preparing columns_priv table
Installing all prepared tables
ERROR: 1062 Duplicate entry 'localhost-root' for key 1
ERROR: 1062 Duplicate entry 'localhost-root' for key 1
020630 9:50:49 ./bin/mysqld: Shutdown Complete
This ERROR thing at the end doesn’t look too good but I don’t give up! I still follow the instructions and change the owner with “chown” etc...: Then, when I run the “mysql test” I get this:
ERROR 2002: Can't connect to local MySQL server through socket '/tmp/mysql.sock' (2)
To try to get a clue on what’s going on, I look at the error log:
[localhost:local/mysql/data] dabest% tail localhost.err
020630 09:59:04 mysqld started
020630 9:59:04 Can't start server: Bind on TCP/IP port: Address already in use
020630 9:59:04 Do you already have another mysqld server running on port: 3306 ?
020630 9:59:04 Aborting
020630 9:59:04 /usr/local/mysql/bin/mysqld: Shutdown Complete
020630 09:59:04 mysqld ended
OK, this error log looks pretty consistant with the ERROR from the install (although the author says lower that it's a message that can be ignored, I just mention it in case). BUT, as I said, I’m just trying to follow the instructions and I have no idea how to fix that or what it means. Looks like I got twice the same thing but that’s the first time I try installing MySQL and I’m not on OSX Server so I don’t think it comes pre-installed... I don’t know how to check what’s using this “TCP/IP port” and even if I did, I wouldn’t know what to do about it...
What to do? Help anyone? Thanks!
-
auto startup for source install
2002-06-23 20:27:02 jrwilla [Reply | View]
I made a couple of changes to get the Marc Liyanage's StartupItem script to work with the source install.
add MYSQL=-YES- to /etc/hostconfig
delete /Library/StartupItems/MySQL/Resources (for simplicity)
Comment out the following two lines of /Library/StartupItems/MySQL/MySQL like this:
#REALDIR=`perl -e 'print readlink "mysql"'`
#cd $REALDIR
-
test.php error
2002-06-23 16:48:11 bluesy [Reply | View]
i get this command "Warning: Failed opening '/Library/WebServer/Documents/test.php' for inclusion (include_path='.:/usr/lib/php') in Unknown on line 0" when i try to run the test.php
Anyone have an idea what it can be, i have tried all the usernames and pass that i got on the machine (all 2) and nothing helps
Dennis
-
Admin password changed
2002-06-19 12:42:01 pattern_p [Reply | View]
Ok, this has now happened both times that I've tried this tutorial. Somehow, the admin password got changed. Has anybody else had this problem, or know why it occured? I tried to install MySQL via source code.
Thanks,
Matt
-
Permission Denied
2002-06-11 01:23:10 macette [Reply | View]
Am probable loser, but nonetheless...
After installing MySQL 3.23.49, I enter this jazz in Terminal, as suggested:
cd /usr/local/mysql/
sudo ./scripts/mysql_install_db
sudo chown -R mysql /usr/local/mysql
sudo ./bin/safe_mysqld --user=mysql &
but rather than getting " Starting mysqld daemon with databases from /usr/local/var" or words to that effect, I get:
"To start mysqld at boot time you have to copy support-files/mysql.server
to the right place for your system
PLEASE REMEMBER TO SET A PASSWORD FOR THE MySQL root USER !
This is done with:
./bin/mysqladmin -u root -p password 'new-password'
./bin/mysqladmin -u root -h localhost -p password 'new-password'
See the manual for more instructions.
You can start the MySQL daemon with:
cd . ; ./bin/safe_mysqld &
You can test the MySQL daemon with the benchmarks in the 'sql-bench' directory:
cd sql-bench ; run-all-tests
Please report any problems with the ./bin/mysqlbug script!
The latest information about MySQL is available on the web at
http://www.mysql.com
Support MySQL by buying support/licenses at https://order.mysql.com"
So I follow the instruction to "start the MySQLDaemon by entering cd . ; ./bin/safe_mysqld & "
and then I get:
"[localhost:/usr/local/mysql] virginia% touch: /usr/local/mysql/data/localhost.err: Permission denied
chown: /usr/local/mysql/data/localhost.err: No such file or directory
Starting mysqld daemon with databases from /usr/local/mysql/data
./bin/safe_mysqld: permission denied: /usr/local/mysql/data/localhost.err [229]
./bin/safe_mysqld: permission denied: /usr/local/mysql/data/localhost.err [235]
tee: /usr/local/mysql/data/localhost.err: Permission denied
020611 18:11:51 mysqld ended
tee: /usr/local/mysql/data/localhost.err: Permission denied"
What now??
I'd be most grateful for some help here... this is my first time in Terminal, and I'm floundering thinking of ways to help myself.
Virginia (virg@alphalink.com.au) -
allmost same problem
2002-06-23 09:19:18 bluesy [Reply | View]
I got all of the other server stuff running from these good articels, unfortunally this one is teasing me :-(
I cant get passed the chown command, i used the packed version to install mysql nd not the source, but it just goes wrong :-(
[localhost:/usr/local/mysql] bluesy% sudo ./scripts/mysql_install_db
Password:
Preparing db table
Preparing host table
Preparing user table
Preparing func table
Preparing tables_priv table
Preparing columns_priv table
Installing all prepared tables
ERROR: 1062 Duplicate entry 'localhost-root' for key 1
ERROR: 1062 Duplicate entry 'localhost-root' for key 1
020623 17:41:33 ./bin/mysqld: Shutdown Complete
To start mysqld at boot time you have to copy support-files/mysql.server
to the right place for your system
PLEASE REMEMBER TO SET A PASSWORD FOR THE MySQL root USER !
This is done with:
./bin/mysqladmin -u root -p password 'new-password'
./bin/mysqladmin -u root -h localhost -p password 'new-password'
See the manual for more instructions.
You can start the MySQL daemon with:
cd . ; ./bin/safe_mysqld &
You can test the MySQL daemon with the benchmarks in the 'sql-bench' directory:
cd sql-bench ; run-all-tests
Please report any problems with the ./bin/mysqlbug script!
The latest information about MySQL is available on the web at
http://www.mysql.com
Support MySQL by buying support/licenses at https://order.mysql.com
[localhost:/usr/local/mysql] bluesy% sudo chown -R mysql /usr/local/mysql
chown: mysql: invalid user name
[localhost:/usr/local/mysql] bluesy% sudo ./bin/safe_mysqlid --user=mysql &
[1] 461
[localhost:/usr/local/mysql] bluesy% sudo: ./bin/safe_mysqlid: command not found -
allmost same problem
2002-08-21 19:17:51 hembeck [Reply | View]
Does anyone know what is causing this error and how to correct the problem? I've followed the steps out lined here VERY CAREFULLY as well as Marc Marc Liyanage's instructions which accompany his installer .pkg.
I've removed the installation several times and have deleted and created the MySQL User several times as well, but I keep getting this error, which just craps out everything.
Please advise. I've spent three days on this thing and have read documentation from all over the place. I lost and very tired of this.
Thanks,
Fernando -
allmost same problem
2002-11-22 14:02:40 cesareborgia [Reply | View]
hi there - i had the same frustration for two days but solved the problem by updating the developer's tools on my mac os 10.2 computer completely - you need to install the August 2002 update especially. Then I compiled the source for mysql and followed the instructions at Apple's Developer site on MySQL installation.
-
chown probs?
2002-06-10 00:37:49 hooplah [Reply | View]
First - the articles are great and I look forward to more.
Second...I was having problems keeping open connections to the database (mysql ended) and read through some of the posts.
I tried the various chown directives suggested - but alas to no avail.
I don't have a var directory to change ownership of, I'm afraid. I did notice that the only files in the var directory of the compiled install were the database and log files - and the pkg installer keeps said files housed in a data folder.
I did the chown command on the data folder and lo! It worked swimmingly!
sudo chown -R mysql /usr/local/mysql/data
I guess my big question now is why? That's the frustrating part. -
chown probs?
2002-06-14 09:45:10 psmalera [Reply | View]
Hi,
About 5 minutes before reading your post I did the exact same thing and it also worked like a charm.
Not sure what the scope of your "why" question is... on a technical level, I think it's because mysql needs to be able to read and write to that table, and it can't do so as long as root owns it and the permissions are restrictively set. My guess is that chmod 777 on the same table would've accomplished the same thing, but I can't see any reason why root should own that table.
Then again, I am a unix newbie, and I know it's dangerous to mess around with permissions like that without understanding the potential for hacking. If I were doing this on a job, I would do a little more research about exactly what exactly the best resolution is-- my guess tho (which is what you and I did) is to chown to mysql-- then, the permissions can still be restrictive since only the mysql account is used to work with the data.
-
Finally Got It to Work!
2002-06-06 19:18:01 pogo [Reply | View]
Hello... after 2 days of struggling with this program, I finally got it to work! I even went so far as to reinstall MacOSX on my machine to start from scratch. What was the problem, and the subsequent solution? I kept getting the error message to the effect that "localhost cannot connect to MySql... or something close to that.
When I compared the instructions given here for setup to those on Marc Liyanage's website ( http://www.entropy.ch/software/macosx/mysql/ ) I kept missing the fact that there is a wildcard character * in one of the lines. In the instructions given here, it is missing.
- Open a terminal window and type in the following commands (without the double quotes):
type "cd /usr/local/mysql"
type "sudo ./scripts/mysql_install_db", enter administrator password when asked
type "sudo chown -R mysql /usr/local/mysql/*"
type "sudo ./bin/safe_mysqld --user=mysql &"
Use it with "mysql test"
Note the above wildcard character! This is for the binary install - add the * in the applicable place for the source install and you should be good to go!
Hope this helps someone,
Bill - Open a terminal window and type in the following commands (without the double quotes):
-
error on test.php
2002-06-05 17:33:03 union144 [Reply | View]
As directed, I copied the php code in this tutorial and then saved into "library/webserver/documents" as test.php. When I run it through the web browser, however, I get the following result :
Connection to the database has been established.
Can't create/write to file './test/wisdom.frm' (Errcode: 13)
Table 'test.wisdom' doesn't exist
Table 'test.wisdom' doesn't exist
Warning: Supplied argument is not a valid MySQL result resource in /Users/yaniv/Sites/test.php on line 42
line 42 in the php is :
while ( $one_line_of_data = mysql_fetch_array( $response ) ) {
help? thank you. and my apologies for the dreadful grammar on my previous post.
-
MySQL must be have admin priveleges
2002-06-05 16:49:32 union144 [Reply | View]
I encountered a problems when I followed your instructions for installing mySQL. When I first created the "MySQL User", I did not give the user administration priveleges, and encountered problems until I corrected that. I think - in this tutorial - you should more explicitly tell people that the "MySQL User" needs to be an admin. Thank you so much for this series of articles - they are immensely useful.
-
Problems with decompression
2002-05-22 12:49:19 dhtmlkitchen [Reply | View]
I noticed that you had me download a tar.gz, but decompress a .gz (see page 2 of your article).
I attempted to decompress the tar.gz file, but I had some problems, or so it seems:
tar: Unable to create mysql-3.23.49/mit-pthreads/gen/ttyname.c <No such file or directory>
mysql-3.23.49/mit-pthreads/gen/getwd.c
tar: Unable to create mysql-3.23.49/mit-pthreads/gen/getwd.c <No such file or directory>
mysql-3.23.49/mit-pthreads/gen/pwd_internal.c
tar: Unable to create mysql-3.23.49/mit-pthreads/gen/pwd_internal.c <No such file or directory>
mysql-3.23.49/mit-pthreads/gen/Makefile.inc
tar: Unable to create mysql-3.23.49/mit-pthreads/gen/Makefile.inc <No such file or directory>
mysql-3.23.49/mit-pthreads/gen/getpwent.c
tar: Unable to create mysql-3.23.49/mit-pthreads/gen/getpwent.c <No such file or directory>
mysql-3.23.49/mit-pthreads/gen/getcwd.c
tar: Unable to create mysql-3.23.49/mit-pthreads/gen/getcwd.c <No such file or directory>
mysql-3.23.49/mit-pthreads/gen/time.c
tar: Unable to create mysql-3.23.49/mit-pthreads/gen/time.c <No such file or directory>
mysql-3.23.49/mit-pthreads/gen/directory.c
tar: Unable to create mysql-3.23.49/mit-pthreads/gen/directory.c <No such file or directory>
mysql-3.23.49/mit-pthreads/gen/syslog.c
tar: Unable to create mysql-3.23.49/mit-pthreads/gen/syslog.c <No such file or directory>
mysql-3.23.49/mit-pthreads/gen/ctime.c
tar: Unable to create mysql-3.23.49/mit-pthreads/gen/ctime.c <No such file or directory>
mysql-3.23.49/mit-pthreads/gen/eprintf.c
tar: Unable to create mysql-3.23.49/mit-pthreads/gen/eprintf.c <No such file or directory>
mysql-3.23.49/mit-pthreads/gen/difftime.c
tar: Unable to create mysql-3.23.49/mit-pthreads/gen/difftime.c <No such file or directory>
mysql-3.23.49/mit-pthreads/gen/getpwnamuid.c
tar: Unable to create mysql-3.23.49/mit-pthreads/gen/getpwnamuid.c <No such file or directory>
mysql-3.23.49/mit-pthreads/gen/isatty.c
tar: Unable to create mysql-3.23.49/mit-pthreads/gen/isatty.c <No such file or directory>
mysql-3.23.49/mit-pthreads/gen/popen.c
tar: Unable to create mysql-3.23.49/mit-pthreads/gen/popen.c <No such file or directory>
mysql-3.23.49/mit-pthreads/gen/pwd_internal.h
tar: Unable to create mysql-3.23.49/mit-pthreads/gen/pwd_internal.h <No such file or directory>
mysql-3.23.49/mit-pthreads/string
tar: Could not create: mysql-3.23.49/mit-pthreads/string <No such file or directory>
mysql-3.23.49/mit-pthreads/string/Makefile.inc
tar: Unable to create mysql-3.23.49/mit-pthreads/string/Makefile.inc <No such file or directory>
mysql-3.23.49/mit-pthreads/string/strtok.c
tar: Unable to create mysql-3.23.49/mit-pthreads/string/strtok.c <No such file or directory>
mysql-3.23.49/mit-pthreads/string/GNUmakefile.inc
tar: Unable to create mysql-3.23.49/mit-pthreads/string/GNUmakefile.inc <No such file or directory>
mysql-3.23.49/mit-pthreads/bin
tar: Could not create: mysql-3.23.49/mit-pthreads/bin <No such file or directory>
mysql-3.23.49/mit-pthreads/bin/finger
tar: Could not create: mysql-3.23.49/mit-pthreads/bin/finger <No such file or directory>
mysql-3.23.49/mit-pthreads/bin/finger/net.c
tar: Unable to create mysql-3.23.49/mit-pthreads/bin/finger/net.c <No such file or directory>
mysql-3.23.49/mit-pthreads/bin/finger/finger.c
tar: Unable to create mysql-3.23.49/mit-pthreads/bin/finger/finger.c <No such file or directory>
mysql-3.23.49/mit-pthreads/bin/finger/Makefile.in
tar: Unable to create mysql-3.23.49/mit-pthreads/bin/finger/Makefile.in <No such file or directory>
mysql-3.23.49/mit-pthreads/bin/finger/.cvsignore
tar: Unable to create mysql-3.23.49/mit-pthreads/bin/finger/.cvsignore <No such file or directory>
mysql-3.23.49/mit-pthreads/bin/finger/Makefile
tar: Unable to create mysql-3.23.49/mit-pthreads/bin/finger/Makefile <No such file or directory>
mysql-3.23.49/mit-pthreads/bin/.cvsignore
tar: Unable to create mysql-3.23.49/mit-pthreads/bin/.cvsignore <No such file or directory>
mysql-3.23.49/mit-pthreads/bin/Makefile.in
tar: Unable to create mysql-3.23.49/mit-pthreads/bin/Makefile.in <No such file or directory>
mysql-3.23.49/mit-pthreads/bin/Makefile
tar: Unable to create mysql-3.23.49/mit-pthreads/bin/Makefile <No such file or directory>
mysql-3.23.49/mit-pthreads/lib
tar: Could not create: mysql-3.23.49/mit-pthreads/lib <No such file or directory>
mysql-3.23.49/mit-pthreads/lib/.cvsignore
tar: Unable to create mysql-3.23.49/mit-pthreads/lib/.cvsignore <No such file or directory>
mysql-3.23.49/mit-pthreads/lib/libpthreadutil
tar: Could not create: mysql-3.23.49/mit-pthreads/lib/libpthreadutil <No such file or directory>
mysql-3.23.49/mit-pthreads/lib/libpthreadutil/Makefile.in
tar: Unable to create mysql-3.23.49/mit-pthreads/lib/libpthreadutil/Makefile.in <No such file or directory>
mysql-3.23.49/mit-pthreads/lib/libpthreadutil/pthread_atexit.c
tar: Unable to create mysql-3.23.49/mit-pthreads/lib/libpthreadutil/pthread_atexit.c <No such file or directory>
mysql-3.23.49/mit-pthreads/lib/libpthreadutil/pthread_tad.c
tar: Unable to create mysql-3.23.49/mit-pthreads/lib/libpthreadutil/pthread_tad.c <No such file or directory>
mysql-3.23.49/mit-pthreads/lib/libpthreadutil/pthreadutil.h
tar: Unable to create mysql-3.23.49/mit-pthreads/lib/libpthreadutil/pthreadutil.h <No such file or directory>
mysql-3.23.49/mit-pthreads/lib/libpthreadutil/.cvsignore
tar: Unable to create mysql-3.23.49/mit-pthreads/lib/libpthreadutil/.cvsignore <No such file or directory>
mysql-3.23.49/mit-pthreads/lib/libpthreadutil/Makefile
tar: Unable to create mysql-3.23.49/mit-pthreads/lib/libpthreadutil/Makefile <No such file or directory>
mysql-3.23.49/mit-pthreads/lib/Makefile.in
tar: Unable to create mysql-3.23.49/mit-pthreads/lib/Makefile.in <No such file or directory>
mysql-3.23.49/mit-pthreads/lib/Makefile
tar: Unable to create mysql-3.23.49/mit-pthreads/lib/Makefile <No such file or directory>
mysql-3.23.49/mit-pthreads/patches
tar: Could not create: mysql-3.23.49/mit-pthreads/patches <No such file or directory>
mysql-3.23.49/mit-pthreads/patches/p155
tar: Unable to create mysql-3.23.49/mit-pthreads/patches/p155 <No such file or directory>
mysql-3.23.49/mit-pthreads/patches/Streepy.html
tar: Unable to create mysql-3.23.49/mit-pthreads/patches/Streepy.html <No such file or directory>
mysql-3.23.49/mit-pthreads/patches/bill_lear
tar: Unable to create mysql-3.23.49/mit-pthreads/patches/bill_lear <No such file or directory>
mysql-3.23.49/mit-pthreads/patches/chris_demetriou
tar: Unable to create mysql-3.23.49/mit-pthreads/patches/chris_demetriou <No such file or directory>
mysql-3.23.49/mit-pthreads/patches/p153
tar: Unable to create mysql-3.23.49/mit-pthreads/patches/p153 <No such file or directory>
mysql-3.23.49/mit-pthreads/patches/mevans
tar: Unable to create mysql-3.23.49/mit-pthreads/patches/mevans <No such file or directory>
mysql-3.23.49/mit-pthreads/patches/Streepy2.html
tar: Unable to create mysql-3.23.49/mit-pthreads/patches/Streepy2.html <No such file or directory>
mysql-3.23.49/mit-pthreads/Whats_New
tar: Unable to create mysql-3.23.49/mit-pthreads/Whats_New <No such file or directory>
mysql-3.23.49/mit-pthreads/README
tar: Unable to create mysql-3.23.49/mit-pthreads/README <No such file or directory>
mysql-3.23.49/mit-pthreads/NOTES
tar: Unable to create mysql-3.23.49/mit-pthreads/NOTES <No such file or directory>
mysql-3.23.49/mit-pthreads/NOTES_OSR5_BUILD_SKUNKWARE97
tar: Unable to create mysql-3.23.49/mit-pthreads/NOTES_OSR5_BUILD_SKUNKWARE97 <No such file or directory>
mysql-3.23.49/mit-pthreads/pg++
tar: Unable to create mysql-3.23.49/mit-pthreads/pg++ <No such file or directory>
mysql-3.23.49/mit-pthreads/FAQ
tar: Unable to create mysql-3.23.49/mit-pthreads/FAQ <No such file or directory>
mysql-3.23.49/mit-pthreads/TODO-mysql
tar: Unable to create mysql-3.23.49/mit-pthreads/TODO-mysql <No such file or directory>
mysql-3.23.49/mit-pthreads/GNUmakefile
tar: Unable to create mysql-3.23.49/mit-pthreads/GNUmakefile <No such file or directory>
mysql-3.23.49/mit-pthreads/pgcc
tar: Unable to create mysql-3.23.49/mit-pthreads/pgcc <No such file or directory>
mysql-3.23.49/mit-pthreads/.cvsignore
tar: Unable to create mysql-3.23.49/mit-pthreads/.cvsignore <No such file or directory>
mysql-3.23.49/mit-pthreads/COPYRIGHT
tar: Unable to create mysql-3.23.49/mit-pthreads/COPYRIGHT <No such file or directory>
mysql-3.23.49/mit-pthreads/configure
tar: Unable to create mysql-3.23.49/mit-pthreads/configure <No such file or directory>
mysql-3.23.49/mit-pthreads/Changes-mysql
tar: Unable to create mysql-3.23.49/mit-pthreads/Changes-mysql <No such file or directory>
mysql-3.23.49/mit-pthreads/config.log
tar: Unable to create mysql-3.23.49/mit-pthreads/config.log <No such file or directory>
mysql-3.23.49/mit-pthreads/config.h
tar: Unable to create mysql-3.23.49/mit-pthreads/config.h <No such file or directory>
mysql-3.23.49/mit-pthreads/config.status
tar: Unable to create mysql-3.23.49/mit-pthreads/config.status <No such file or directory>
mysql-3.23.49/mit-pthreads/config.flags
tar: Unable to create mysql-3.23.49/mit-pthreads/config.flags <No such file or directory>
mysql-3.23.49/mit-pthreads/Makefile
tar: Unable to create mysql-3.23.49/mit-pthreads/Makefile <No such file or directory>
mysql-3.23.49/libmysql_r
tar: Could not create: mysql-3.23.49/libmysql_r <No such file or directory>
mysql-3.23.49/libmysql_r/Makefile.in
tar: Unable to create mysql-3.23.49/libmysql_r/Makefile.in <No such file or directory>
mysql-3.23.49/libmysql_r/Makefile.am
tar: Unable to create mysql-3.23.49/libmysql_r/Makefile.am <No such file or directory>
mysql-3.23.49/libmysql_r/libmysql.c
tar: Unable to create mysql-3.23.49/libmysql_r/libmysql.c <No such file or directory>
mysql-3.23.49/libmysql_r/net.c
tar: Unable to create mysql-3.23.49/libmysql_r/net.c <No such file or directory>
mysql-3.23.49/libmysql_r/violite.c
tar: Unable to create mysql-3.23.49/libmysql_r/violite.c <No such file or directory>
mysql-3.23.49/libmysql_r/password.c
tar: Unable to create mysql-3.23.49/libmysql_r/password.c <No such file or directory>
mysql-3.23.49/libmysql_r/get_password.c
tar: Unable to create mysql-3.23.49/libmysql_r/get_password.c <No such file or directory>
mysql-3.23.49/libmysql_r/errmsg.c
tar: Unable to create mysql-3.23.49/libmysql_r/errmsg.c <No such file or directory>
mysql-3.23.49/libmysql_r/conf_to_src.c
tar: Unable to create mysql-3.23.49/libmysql_r/conf_to_src.c <No such file or directory>
mysql-3.23.49/libmysql
tar: Could not create: mysql-3.23.49/libmysql <No such file or directory>
mysql-3.23.49/libmysql/Makefile.in
tar: Unable to create mysql-3.23.49/libmysql/Makefile.in <No such file or directory>
mysql-3.23.49/libmysql/Makefile.am
tar: Unable to create mysql-3.23.49/libmysql/Makefile.am <No such file or directory>
mysql-3.23.49/libmysql/acinclude.m4
tar: Unable to create mysql-3.23.49/libmysql/acinclude.m4 <No such file or directory>
mysql-3.23.49/libmysql/libmysql.c
tar: Unable to link to mysql-3.23.49/libmysql_r/libmysql.c from mysql-3.23.49/libmysql/libmysql.c <No such file or directory>
mysql-3.23.49/libmysql/net.c
tar: Unable to link to mysql-3.23.49/libmysql_r/net.c from mysql-3.23.49/libmysql/net.c <No such file or directory>
mysql-3.23.49/libmysql/violite.c
tar: Unable to link to mysql-3.23.49/libmysql_r/violite.c from mysql-3.23.49/libmysql/violite.c <No such file or directory>
mysql-3.23.49/libmysql/password.c
tar: Unable to link to mysql-3.23.49/libmysql_r/password.c from mysql-3.23.49/libmysql/password.c <No such file or directory>
mysql-3.23.49/libmysql/get_password.c
tar: Unable to link to mysql-3.23.49/libmysql_r/get_password.c from mysql-3.23.49/libmysql/get_password.c <No such file or directory>
mysql-3.23.49/libmysql/errmsg.c
tar: Unable to link to mysql-3.23.49/libmysql_r/errmsg.c from mysql-3.23.49/libmysql/errmsg.c <No such file or directory>
mysql-3.23.49/libmysql/conf_to_src.c
tar: Unable to link to mysql-3.23.49/libmysql_r/conf_to_src.c from mysql-3.23.49/libmysql/conf_to_src.c <No such file or directory>
mysql-3.23.49/libmysql/Makefile.shared
tar: Unable to create mysql-3.23.49/libmysql/Makefile.shared <No such file or directory>
mysql-3.23.49/client
tar: Could not create: mysql-3.23.49/client <No such file or directory>
mysql-3.23.49/client/Makefile.in
tar: Unable to create mysql-3.23.49/client/Makefile.in <No such file or directory>
mysql-3.23.49/client/Makefile.am
tar: Unable to create mysql-3.23.49/client/Makefile.am <No such file or directory>
mysql-3.23.49/client/mysql.cc
tar: Unable to create mysql-3.23.49/client/mysql.cc <No such file or directory>
mysql-3.23.49/client/readline.cc
tar: Unable to create mysql-3.23.49/client/readline.cc <No such file or directory>
mysql-3.23.49/client/sql_string.cc
tar: Unable to create mysql-3.23.49/client/sql_string.cc <No such file or directory>
mysql-3.23.49/client/completion_hash.cc
tar: Unable to create mysql-3.23.49/client/completion_hash.cc <No such file or directory>
mysql-3.23.49/client/mysqladmin.c
tar: Unable to create mysql-3.23.49/client/mysqladmin.c <No such file or directory>
mysql-3.23.49/client/mysqlcheck.c
tar: Unable to create mysql-3.23.49/client/mysqlcheck.c <No such file or directory>
mysql-3.23.49/client/mysqlshow.c
tar: Unable to create mysql-3.23.49/client/mysqlshow.c <No such file or directory>
mysql-3.23.49/client/mysqldump.c
tar: Unable to create mysql-3.23.49/client/mysqldump.c <No such file or directory>
mysql-3.23.49/client/mysqlimport.c
tar: Unable to create mysql-3.23.49/client/mysqlimport.c <No such file or directory>
mysql-3.23.49/client/mysqltest.c
tar: Unable to create mysql-3.23.49/client/mysqltest.c <No such file or directory>
mysql-3.23.49/client/mysqlbinlog.cc
tar: Unable to create mysql-3.23.49/client/mysqlbinlog.cc <No such file or directory>
mysql-3.23.49/client/insert_test.c
tar: Unable to create mysql-3.23.49/client/insert_test.c <No such file or directory>
mysql-3.23.49/client/select_test.c
tar: Unable to create mysql-3.23.49/client/select_test.c <No such file or directory>
mysql-3.23.49/client/thread_test.c
tar: Unable to create mysql-3.23.49/client/thread_test.c <No such file or directory>
mysql-3.23.49/client/sql_string.h
tar: Unable to create mysql-3.23.49/client/sql_string.h <No such file or directory>
mysql-3.23.49/client/completion_hash.h
tar: Unable to create mysql-3.23.49/client/completion_hash.h <No such file or directory>
mysql-3.23.49/client/my_readline.h
tar: Unable to create mysql-3.23.49/client/my_readline.h <No such file or directory>
mysql-3.23.49/client/client_priv.h
tar: Unable to create mysql-3.23.49/client/client_priv.h <No such file or directory>
mysql-3.23.49/innobase
tar: Could not create: mysql-3.23.49/innobase <No such file or directory>
mysql-3.23.49/innobase/Makefile.in
tar: Unable to create mysql-3.23.49/innobase/Makefile.in <No such file or directory>
mysql-3.23.49/innobase/stamp-h.in
tar: Unable to create mysql-3.23.49/innobase/stamp-h.in <No such file or directory>
mysql-3.23.49/innobase/Makefile.am
tar: Unable to create mysql-3.23.49/innobase/Makefile.am <No such file or directory>
mysql-3.23.49/innobase/aclocal.m4
tar: Unable to create mysql-3.23.49/innobase/aclocal.m4 <No such file or directory>
mysql-3.23.49/innobase/configure
tar: Unable to create mysql-3.23.49/innobase/configure <No such file or directory>
mysql-3.23.49/innobase/configure.in
tar: Unable to create mysql-3.23.49/innobase/configure.in <No such file or directory>
mysql-3.23.49/innobase/ib_config.h.in
tar: Unable to create mysql-3.23.49/innobase/ib_config.h.in <No such file or directory>
mysql-3.23.49/innobase/ib_config.h
tar: Unable to create mysql-3.23.49/innobase/ib_config.h <No such file or directory>
mysql-3.23.49/innobase/os
tar: Could not create: mysql-3.23.49/innobase/os <No such file or directory>
mysql-3.23.49/innobase/os/Makefile.in
tar: Unable to create mysql-3.23.49/innobase/os/Makefile.in <No such file or directory>
mysql-3.23.49/innobase/os/Makefile.am
tar: Unable to create mysql-3.23.49/innobase/os/Makefile.am <No such file or directory>
mysql-3.23.49/innobase/os/os0proc.c
tar: Unable to create mysql-3.23.49/innobase/os/os0proc.c <No such file or directory>
mysql-3.23.49/innobase/os/os0shm.c
tar: Unable to create mysql-3.23.49/innobase/os/os0shm.c <No such file or directory>
mysql-3.23.49/innobase/os/os0sync.c
tar: Unable to create mysql-3.23.49/innobase/os/os0sync.c <No such file or directory>
mysql-3.23.49/innobase/os/os0thread.c
tar: Unable to create mysql-3.23.49/innobase/os/os0thread.c <No such file or directory>
mysql-3.23.49/innobase/os/os0file.c
tar: Unable to create mysql-3.23.49/innobase/os/os0file.c <No such file or directory>
mysql-3.23.49/innobase/ut
tar: Could not create: mysql-3.23.49/innobase/ut <No such file or directory>
mysql-3.23.49/innobase/ut/Makefile.in
tar: Unable to create mysql-3.23.49/innobase/ut/Makefile.in <No such file or directory>
mysql-3.23.49/innobase/ut/Makefile.am
tar: Unable to create mysql-3.23.49/innobase/ut/Makefile.am <No such file or directory>
mysql-3.23.49/innobase/ut/ut0byte.c
tar: Unable to create mysql-3.23.49/innobase/ut/ut0byte.c <No such file or directory>
mysql-3.23.49/innobase/ut/ut0dbg.c
tar: Unable to create mysql-3.23.49/innobase/ut/ut0dbg.c <No such file or directory>
mysql-3.23.49/innobase/ut/ut0mem.c
tar: Unable to create mysql-3.23.49/innobase/ut/ut0mem.c <No such file or directory>
mysql-3.23.49/innobase/ut/ut0rnd.c
tar: Unable to create mysql-3.23.49/innobase/ut/ut0rnd.c <No such file or directory>
mysql-3.23.49/innobase/ut/ut0ut.c
tar: Unable to create mysql-3.23.49/innobase/ut/ut0ut.c <No such file or directory>
mysql-3.23.49/innobase/btr
tar: Could not create: mysql-3.23.49/innobase/btr <No such file or directory>
mysql-3.23.49/innobase/btr/Makefile.in
tar: Unable to create mysql-3.23.49/innobase/btr/Makefile.in <No such file or directory>
mysql-3.23.49/innobase/btr/Makefile.am
tar: Unable to create mysql-3.23.49/innobase/btr/Makefile.am <No such file or directory>
mysql-3.23.49/innobase/btr/btr0btr.c
tar: Unable to create mysql-3.23.49/innobase/btr/btr0btr.c <No such file or directory>
mysql-3.23.49/innobase/btr/btr0cur.c
tar: Unable to create mysql-3.23.49/innobase/btr/btr0cur.c <No such file or directory>
mysql-3.23.49/innobase/btr/btr0pcur.c
tar: Unable to create mysql-3.23.49/innobase/btr/btr0pcur.c <No such file or directory>
mysql-3.23.49/innobase/btr/btr0sea.c
tar: Unable to create mysql-3.23.49/innobase/btr/btr0sea.c <No such file or directory>
mysql-3.23.49/innobase/buf
tar: Could not create: mysql-3.23.49/innobase/buf <No such file or directory>
mysql-3.23.49/innobase/buf/Makefile.in
tar: Unable to create mysql-3.23.49/innobase/buf/Makefile.in <No such file or directory>
mysql-3.23.49/innobase/buf/Makefile.am
tar: Unable to create mysql-3.23.49/innobase/buf/Makefile.am <No such file or directory>
mysql-3.23.49/innobase/buf/buf0buf.c
tar: Unable to create mysql-3.23.49/innobase/buf/buf0buf.c <No such file or directory>
mysql-3.23.49/innobase/buf/buf0flu.c
tar: Unable to create mysql-3.23.49/innobase/buf/buf0flu.c <No such file or directory>
mysql-3.23.49/innobase/buf/buf0lru.c
tar: Unable to create mysql-3.23.49/innobase/buf/buf0lru.c <No such file or directory>
mysql-3.23.49/innobase/buf/buf0rea.c
tar: Unable to create mysql-3.23.49/innobase/buf/buf0rea.c <No such file or directory>
mysql-3.23.49/innobase/com
tar: Could not create: mysql-3.23.49/innobase/com <No such file or directory>
mysql-3.23.49/innobase/com/Makefile.in
tar: Unable to create mysql-3.23.49/innobase/com/Makefile.in <No such file or directory>
mysql-3.23.49/innobase/com/Makefile.am
tar: Unable to create mysql-3.23.49/innobase/com/Makefile.am <No such file or directory>
mysql-3.23.49/innobase/com/com0com.c
tar: Unable to create mysql-3.23.49/innobase/com/com0com.c <No such file or directory>
mysql-3.23.49/innobase/com/com0shm.c
tar: Unable to create mysql-3.23.49/innobase/com/com0shm.c <No such file or directory>
mysql-3.23.49/innobase/data
tar: Could not create: mysql-3.23.49/innobase/data <No such file or directory>
mysql-3.23.49/innobase/data/Makefile.in
tar: Unable to create mysql-3.23.49/innobase/data/Makefile.in <No such file or directory>
mysql-3.23.49/innobase/data/Makefile.am
tar: Unable to create mysql-3.23.49/innobase/data/Makefile.am <No such file or directory>
mysql-3.23.49/innobase/data/data0data.c
tar: Unable to create mysql-3.23.49/innobase/data/data0data.c <No such file or directory>
mysql-3.23.49/innobase/data/data0type.c
tar: Unable to create mysql-3.23.49/innobase/data/data0type.c <No such file or directory>
mysql-3.23.49/innobase/dict
tar: Could not create: mysql-3.23.49/innobase/dict <No such file or directory>
mysql-3.23.49/innobase/dict/Makefile.in
tar: Unable to create mysql-3.23.49/innobase/dict/Makefile.in <No such file or directory>
mysql-3.23.49/innobase/dict/Makefile.am
tar: Unable to create mysql-3.23.49/innobase/dict/Makefile.am <No such file or directory>
mysql-3.23.49/innobase/dict/dict0boot.c
tar: Unable to create mysql-3.23.49/innobase/dict/dict0boot.c <No such file or directory>
mysql-3.23.49/innobase/dict/dict0crea.c
tar: Unable to create mysql-3.23.49/innobase/dict/dict0crea.c <No such file or directory>
mysql-3.23.49/innobase/dict/dict0dict.c
tar: Unable to create mysql-3.23.49/innobase/dict/dict0dict.c <No such file or directory>
mysql-3.23.49/innobase/dict/dict0load.c
tar: Unable to create mysql-3.23.49/innobase/dict/dict0load.c <No such file or directory>
mysql-3.23.49/innobase/dict/dict0mem.c
tar: Unable to create mysql-3.23.49/innobase/dict/dict0mem.c <No such file or directory>
mysql-3.23.49/innobase/dyn
tar: Could not create: mysql-3.23.49/innobase/dyn <No such file or directory>
mysql-3.23.49/innobase/dyn/Makefile.in
tar: Unable to create mysql-3.23.49/innobase/dyn/Makefile.in <No such file or directory>
mysql-3.23.49/innobase/dyn/Makefile.am
tar: Unable to create mysql-3.23.49/innobase/dyn/Makefile.am <No such file or directory>
mysql-3.23.49/innobase/dyn/dyn0dyn.c
tar: Unable to create mysql-3.23.49/innobase/dyn/dyn0dyn.c <No such file or directory>
mysql-3.23.49/innobase/eval
tar: Could not create: mysql-3.23.49/innobase/eval <No such file or directory>
mysql-3.23.49/innobase/eval/Makefile.in
tar: Unable to create mysql-3.23.49/innobase/eval/Makefile.in <No such file or directory>
mysql-3.23.49/innobase/eval/Makefile.am
tar: Unable to create mysql-3.23.49/innobase/eval/Makefile.am <No such file or directory>
mysql-3.23.49/innobase/eval/eval0eval.c
tar: Unable to create mysql-3.23.49/innobase/eval/eval0eval.c <No such file or directory>
mysql-3.23.49/innobase/eval/eval0proc.c
tar: Unable to create mysql-3.23.49/innobase/eval/eval0proc.c <No such file or directory>
mysql-3.23.49/innobase/fil
tar: Could not create: mysql-3.23.49/innobase/fil <No such file or directory>
mysql-3.23.49/innobase/fil/Makefile.in
tar: Unable to create mysql-3.23.49/innobase/fil/Makefile.in <No such file or directory>
mysql-3.23.49/innobase/fil/Makefile.am
tar: Unable to create mysql-3.23.49/innobase/fil/Makefile.am <No such file or directory>
mysql-3.23.49/innobase/fil/fil0fil.c
tar: Unable to create mysql-3.23.49/innobase/fil/fil0fil.c <No such file or directory>
mysql-3.23.49/innobase/fsp
tar: Could not create: mysql-3.23.49/innobase/fsp <No such file or directory>
mysql-3.23.49/innobase/fsp/Makefile.in
tar: Unable to create mysql-3.23.49/innobase/fsp/Makefile.in <No such file or directory>
mysql-3.23.49/innobase/fsp/Makefile.am
tar: Unable to create mysql-3.23.49/innobase/fsp/Makefile.am <No such file or directory>
mysql-3.23.49/innobase/fsp/fsp0fsp.c
tar: Unable to create mysql-3.23.49/innobase/fsp/fsp0fsp.c <No such file or directory>
mysql-3.23.49/innobase/fut
tar: Could not create: mysql-3.23.49/innobase/fut <No such file or directory>
mysql-3.23.49/innobase/fut/Makefile.in
tar: Unable to create mysql-3.23.49/innobase/fut/Makefile.in <No such file or directory>
mysql-3.23.49/innobase/fut/Makefile.am
tar: Unable to create mysql-3.23.49/innobase/fut/Makefile.am <No such file or directory>
mysql-3.23.49/innobase/fut/fut0fut.c
tar: Unable to create mysql-3.23.49/innobase/fut/fut0fut.c <No such file or directory>
mysql-3.23.49/innobase/fut/fut0lst.c
tar: Unable to create mysql-3.23.49/innobase/fut/fut0lst.c <No such file or directory>
mysql-3.23.49/innobase/ha
tar: Could not create: mysql-3.23.49/innobase/ha <No such file or directory>
mysql-3.23.49/innobase/ha/Makefile.in
tar: Unable to create mysql-3.23.49/innobase/ha/Makefile.in <No such file or directory>
mysql-3.23.49/innobase/ha/Makefile.am
tar: Unable to create mysql-3.23.49/innobase/ha/Makefile.am <No such file or directory>
mysql-3.23.49/innobase/ha/ha0ha.c
tar: Unable to create mysql-3.23.49/innobase/ha/ha0ha.c <No such file or directory>
mysql-3.23.49/innobase/ha/hash0hash.c
tar: Unable to create mysql-3.23.49/innobase/ha/hash0hash.c <No such file or directory>
mysql-3.23.49/innobase/ibuf
tar: Could not create: mysql-3.23.49/innobase/ibuf <No such file or directory>
mysql-3.23.49/innobase/ibuf/Makefile.in
tar: Unable to create mysql-3.23.49/innobase/ibuf/Makefile.in <No such file or directory>
mysql-3.23.49/innobase/ibuf/Makefile.am
tar: Unable to create mysql-3.23.49/innobase/ibuf/Makefile.am <No such file or directory>
mysql-3.23.49/innobase/ibuf/ibuf0ibuf.c
tar: Unable to create mysql-3.23.49/innobase/ibuf/ibuf0ibuf.c <No such file or directory>
mysql-3.23.49/innobase/include
tar: Could not create: mysql-3.23.49/innobase/include <No such file or directory>
mysql-3.23.49/innobase/include/Makefile.in
tar: Unable to create mysql-3.23.49/innobase/include/Makefile.in <No such file or directory>
mysql-3.23.49/innobase/include/Makefile.am
tar: Unable to create mysql-3.23.49/innobase/include/Makefile.am <No such file or directory>
mysql-3.23.49/innobase/include/btr0btr.h
tar: Unable to create mysql-3.23.49/innobase/include/btr0btr.h <No such file or directory>
mysql-3.23.49/innobase/include/btr0btr.ic
tar: Unable to create mysql-3.23.49/innobase/include/btr0btr.ic <No such file or directory>
mysql-3.23.49/innobase/include/btr0cur.h
tar: Unable to create mysql-3.23.49/innobase/include/btr0cur.h <No such file or directory>
mysql-3.23.49/innobase/include/btr0cur.ic
tar: Unable to create mysql-3.23.49/innobase/include/btr0cur.ic <No such file or directory>
mysql-3.23.49/innobase/include/btr0pcur.h
tar: Unable to create mysql-3.23.49/innobase/include/btr0pcur.h <No such file or directory>
mysql-3.23.49/innobase/include/btr0pcur.ic
tar: Unable to create mysql-3.23.49/innobase/include/btr0pcur.ic <No such file or directory>
mysql-3.23.49/innobase/include/btr0sea.h
tar: Unable to create mysql-3.23.49/innobase/include/btr0sea.h <No such file or directory>
mysql-3.23.49/innobase/include/btr0sea.ic
tar: Unable to create mysql-3.23.49/innobase/include/btr0sea.ic <No such file or directory>
mysql-3.23.49/innobase/include/btr0types.h
tar: Unable to create mysql-3.23.49/innobase/include/btr0types.h <No such file or directory>
mysql-3.23.49/innobase/include/buf0buf.h
tar: Unable to create mysql-3.23.49/innobase/include/buf0buf.h <No such file or directory>
mysql-3.23.49/innobase/include/buf0buf.ic
tar: Unable to create mysql-3.23.49/innobase/include/buf0buf.ic <No such file or directory>
mysql-3.23.49/innobase/include/buf0flu.h
tar: Unable to create mysql-3.23.49/innobase/include/buf0flu.h <No such file or directory>
mysql-3.23.49/innobase/include/buf0flu.ic
tar: Unable to create mysql-3.23.49/innobase/include/buf0flu.ic <No such file or directory>
mysql-3.23.49/innobase/include/buf0lru.h
tar: Unable to create mysql-3.23.49/innobase/include/buf0lru.h <No such file or directory>
mysql-3.23.49/innobase/include/buf0lru.ic
tar: Unable to create mysql-3.23.49/innobase/include/buf0lru.ic <No such file or directory>
mysql-3.23.49/innobase/include/buf0rea.h
tar: Unable to create mysql-3.23.49/innobase/include/buf0rea.h <No such file or directory>
mysql-3.23.49/innobase/include/buf0types.h
tar: Unable to create mysql-3.23.49/innobase/include/buf0types.h <No such file or directory>
mysql-3.23.49/innobase/include/com0com.h
tar: Unable to create mysql-3.23.49/innobase/include/com0com.h <No such file or directory>
mysql-3.23.49/innobase/include/com0com.ic
tar: Unable to create mysql-3.23.49/innobase/include/com0com.ic <No such file or directory>
mysql-3.23.49/innobase/include/com0shm.h
tar: Unable to create mysql-3.23.49/innobase/include/com0shm.h <No such file or directory>
mysql-3.23.49/innobase/include/com0shm.ic
tar: Unable to create mysql-3.23.49/innobase/include/com0shm.ic <No such file or directory>
mysql-3.23.49/innobase/include/data0data.h
tar: Unable to create mysql-3.23.49/innobase/include/data0data.h <No such file or directory>
mysql-3.23.49/innobase/include/data0data.ic
tar: Unable to create mysql-3.23.49/innobase/include/data0data.ic <No such file or directory>
mysql-3.23.49/innobase/include/data0type.h
tar: Unable to create mysql-3.23.49/innobase/include/data0type.h <No such file or directory>
mysql-3.23.49/innobase/include/data0type.ic
tar: Unable to create mysql-3.23.49/innobase/include/data0type.ic <No such file or directory>
mysql-3.23.49/innobase/include/data0types.h
tar: Unable to create mysql-3.23.49/innobase/include/data0types.h <No such file or directory>
mysql-3.23.49/innobase/include/db0err.h
tar: Unable to create mysql-3.23.49/innobase/include/db0err.h <No such file or directory>
mysql-3.23.49/innobase/include/dict0boot.h
tar: Unable to create mysql-3.23.49/innobase/include/dict0boot.h <No such file or directory>
mysql-3.23.49/innobase/include/dict0boot.ic
tar: Unable to create mysql-3.23.49/innobase/include/dict0boot.ic <No such file or directory>
mysql-3.23.49/innobase/include/dict0crea.h
tar: Unable to create mysql-3.23.49/innobase/include/dict0crea.h <No such file or directory>
mysql-3.23.49/innobase/include/dict0crea.ic
tar: Unable to create mysql-3.23.49/innobase/include/dict0crea.ic <No such file or directory>
mysql-3.23.49/innobase/include/dict0dict.h
tar: Unable to create mysql-3.23.49/innobase/include/dict0dict.h <No such file or directory>
mysql-3.23.49/innobase/include/dict0dict.ic
tar: Unable to create mysql-3.23.49/innobase/include/dict0dict.ic <No such file or directory>
mysql-3.23.49/innobase/include/dict0load.h
tar: Unable to create mysql-3.23.49/innobase/include/dict0load.h <No such file or directory>
mysql-3.23.49/innobase/include/dict0load.ic
tar: Unable to create mysql-3.23.49/innobase/include/dict0load.ic <No such file or directory>
mysql-3.23.49/innobase/include/dict0mem.h
tar: Unable to create mysql-3.23.49/innobase/include/dict0mem.h <No such file or directory>
mysql-3.23.49/innobase/include/dict0mem.ic
tar: Unable to create mysql-3.23.49/innobase/include/dict0mem.ic <No such file or directory>
mysql-3.23.49/innobase/include/dict0types.h
tar: Unable to create mysql-3.23.49/innobase/include/dict0types.h <No such file or directory>
mysql-3.23.49/innobase/include/dyn0dyn.h
tar: Unable to create mysql-3.23.49/innobase/include/dyn0dyn.h <No such file or directory>
mysql-3.23.49/innobase/include/dyn0dyn.ic
tar: Unable to create mysql-3.23.49/innobase/include/dyn0dyn.ic <No such file or directory>
mysql-3.23.49/innobase/include/eval0eval.h
tar: Unable to create mysql-3.23.49/innobase/include/eval0eval.h <No such file or directory>
mysql-3.23.49/innobase/include/eval0eval.ic
tar: Unable to create mysql-3.23.49/innobase/include/eval0eval.ic <No such file or directory>
mysql-3.23.49/innobase/include/eval0proc.h
tar: Unable to create mysql-3.23.49/innobase/include/eval0proc.h <No such file or directory>
mysql-3.23.49/innobase/include/eval0proc.ic
tar: Unable to create mysql-3.23.49/innobase/include/eval0proc.ic <No such file or directory>
mysql-3.23.49/innobase/include/fil0fil.h
tar: Unable to create mysql-3.23.49/innobase/include/fil0fil.h <No such file or directory>
mysql-3.23.49/innobase/include/fsp0fsp.h
tar: Unable to create mysql-3.23.49/innobase/include/fsp0fsp.h <No such file or directory>
-- truncated --
-
Unable to define the MySQL User
2002-05-19 16:21:56 michele [Reply | View]
Sorry to come so late. I've begun the tutorial part I yesterday and passed through the first 4 parts painless.
With part 5, I simply cannot create the MySQL Account, since I have already a MySQL Database Server account with short name mysql.
I don't know where it comes from (likely from one package I installed), but I have not created it by myself.
I'm running system 10.1.4 with WebObjects 5.1.2 and JavaWebStart 1.0.1 if it matters. And I'm the only user of this PowerMacintosh G3.
Any help would be much appreciated.
Michèle
-
Yeah, but how do you shut it down
2002-05-10 17:33:27 hembeck [Reply | View]
How does one shut down the sql server, either via the terminal or a script similar to the start-up script mentioned in the article.
Thanks,
Fernando
-
.pkg MySQL installation won't start
2002-05-09 10:22:19 cmessley [Reply | View]
I too am getting hung up on initializing the core MySQL database. Here's what I'm seeing:
[localhost:/usr/local/mysql] root# sudo ./scripts/mysql_install_db
Installing all prepared tables
020509 12:11:49 ./bin/mysqld: Shutdown Complete
To start mysqld at boot time you have to copy support-files/mysql.server
to the right place for your system
PLEASE REMEMBER TO SET A PASSWORD FOR THE MySQL root USER !
This is done with:
./bin/mysqladmin -u root -p password 'new-password'
./bin/mysqladmin -u root -h localhost -p password 'new-password'
See the manual for more instructions.
NOTE: If you are upgrading from a MySQL <= 3.22.10 you should run
the ./bin/mysql_fix_privilege_tables. Otherwise you will not be
able to use the new GRANT command!
You can start the MySQL daemon with:
cd . ; ./bin/safe_mysqld &
You can test the MySQL daemon with the benchmarks in the 'sql-bench' directory:
cd sql-bench ; run-all-tests
Please report any problems with the ./bin/mysqlbug script!
The latest information about MySQL is available on the web at
http://www.mysql.com
Support MySQL by buying support/licenses at https://order.mysql.com
[localhost:/usr/local/mysql] root# sudo chown -R mysql /usr/local/mysql
[localhost:/usr/local/mysql] root# sudo ./bin/safe_mysqld --user=mysql &
[1] 1424
[localhost:/usr/local/mysql] root# Starting mysqld daemon with databases from /usr/local/mysql/data
020509 12:12:48 mysqld ended
I'm also loosing the command prompt at this point. I've tried running this several times with the same results.
Sorry about redundantly posting about this problem but I haven't found a solution to this from others comments. Any insight would be appreciated.
- Chris -
.pkg MySQL installation won't start
2002-05-10 10:47:03 cmessley [Reply | View]
I went back to Marc Liyanage's site (http://www.entropy.ch) to see if he had anything posted about this problem and noticed that his install instructions were the same except for the chown command:
sudo chown -R /usr/local/mysql/*
This did the trick. Must... remain... awake...
-
Errcode: 13
2002-05-07 04:26:23 anthropos9 [Reply | View]
I ran the pkg install of MySQL and everything seemed to be working until I ran the test.php script. Here's what I got:
Connection to the database has been established.
Can't create/write to file './test/wisdom.frm' (Errcode: 13)
Table 'test.wisdom' doesn't exist
Table 'test.wisdom' doesn't exist
Warning: Supplied argument is not a valid MySQL result resource in /Users/seandean/Sites/test1.php on line 41
Can anyone help me with what I may have done wrong here? -
Errcode: 13
2002-05-07 15:27:28 jmillr [Reply | View]
I had exactly the same problem. Looking at all the posts here I saw one clue:
sudo chown -R mysql /usr/local/mysql/*
After running this command, the php script runs as advertised. (The instructions in the article are still wrong; they omit the trailing '/*').
-
Apache giving 405 errors for POST requests.
2002-05-05 13:10:47 david.parrish@buentec.com [Reply | View]
this may not be the perfect juncture for this question / observation, but as I am confident that Morbus knows the answer, I'm going to give it a try.
I'm getting 405 errors from Apache for any POST request. I've had a look at the access log files to verify this, and all POST requests are resulting in 405.
This is odd, because a couple of days ago, I tried the PHP test in the article (hello.php POSTS data to action.php), and it worked fine.
As far as I'm aware I have not changed anythingin the httpd.config file since then - but I am having my doubts.
I've had a good look throught the Apache documentation, and I can't find anything that might cause or rectify this issue.
Any thoughts - anyone?
/David -
Apache giving 405 errors for POST requests.
2003-07-18 17:27:48 anonymous2 [Reply | View]
I am having a similar problem. I have noticed a few other things in my situation however. That is, http://www.mydomain.com/cgi-bin/ is not available and the files at http://www.mydomain.com/CGI-Executables/ are read as text files. This suggests that the Script Alias in httpd.conf is not being set but I have checked it and it looks fine. Any other ideas folks?
-
Warning: MySQL Connection Failed: Can't connect to MySQL server on 'localhost' (61)
2002-05-04 17:21:56 xor81 [Reply | View]
excellent articles....did 1-5 without any problems but then i got this on MySQL.....seems it is stopping straight away after starting....any ideas
[localhost:/usr/local/mysql] ian%
[localhost:/usr/local/mysql] ian% Starting mysqld daemon with databases from /usr/local/mysql/data
020505 01:15:50 mysqld ended -
update
2002-05-05 08:20:19 xor81 [Reply | View]
After a days playing with the terminal I managed to get it to:
Warning: Host 'localhost.dircon.co.uk' is not allowed to connect to this MySQL server in /Library/WebServer/Documents/test_sql.php on line 6
can't be far off now :-(
how about tomcat on osx
Ian
-
Resolution?
2002-05-22 16:32:58 sanjuanio1 [Reply | View]
I am having the same problem. Did you find out how to resolve?
I have the following error messages:
Warning: Can't connect to local MySQL server through socket '/tmp/mysql.sock' (61) in /Library/WebServer/Documents/test.php on line 6
Warning: MySQL Connection Failed: Can't connect to local MySQL server through socket '/tmp/mysql.sock' (61)
in /Library/WebServer/Documents/test.php on line 6
Warning: Can't connect to local MySQL server through socket '/tmp/mysql.sock' (61) in /Library/WebServer/Documents/test.php on line 10
Warning: MySQL Connection Failed: Can't connect to local MySQL server through socket '/tmp/mysql.sock' (61)
in /Library/WebServer/Documents/test.php on line 10
Warning: MySQL: A link to the server could not be established in /Library/WebServer/Documents/test.php on line 10
Can't connect to local MySQL server through socket '/tmp/mysql.sock' (61)
My Sequel database session keeps ending when I check it using the chown line. I also downloaded the doubleclick startup.
Any ideas? -
Closer
2002-05-22 18:09:10 sanjuanio1 [Reply | View]
I havent found the answer quite yet, but getting closer. see these links off of the mysql site if you have this problem.
http://www.mysql.com/doc/C/a/Can_not_connect_to_server.html
http://www.mysql.com/doc/S/t/Starting_server.html
and let me know if it helps.
danke
-
Can't Resolve Hostname
2002-05-01 09:13:09 orisjt [Reply | View]
First of all, THANKS for the tutorial. I finally got PHP and SQL up and running on my OS X Server because of your articles (btw, I am not an IT person, and I haven't used command-line UNIX since 1984).
Even though SQL seems to be running now, I cannot seem to resolve the actual hostname of the server. The test.php page you provide for the MySQL example works as long as the hostname is entered as'localhost', but if I use the actual hostname of the server or it's IP address, I get a 'cannot connect' error. I get the same problem with another package (PowerPHlogger), except it won't even recognize the 'localhost' variable, so I can't get it to work at all.
What's up?
-
access denied
2002-05-01 02:06:13 bernad [Reply | View]
I know I made it work before with a nother tutorial, now it says
Host 'localhost.127.in-addr.arpa' is not allowed to connect to this MySQL server in ...
-
Ugh :: Warning: Access denied...
2002-05-01 00:31:56 gosick [Reply | View]
In as much as I'm following the plebian way and doing what I'm told - Here's the result of my play...
"Warning: Access denied for user: 'root@localhost' (Using password: NO) in /Library/WebServer/Documents/test.php on line 5
Warning: MySQL Connection Failed: Access denied for user: 'root@localhost' (Using password: NO)
in /Library/WebServer/Documents/test.php on line 5
Connection to the database has been established.
Warning: Supplied argument is not a valid MySQL-Link resource in /Library/WebServer/Documents/test.php on line 18
Warning: Supplied argument is not a valid MySQL-Link resource in /Library/WebServer/Documents/test.php on line 28
Warning: Supplied argument is not a valid MySQL-Link resource in /Library/WebServer/Documents/test.php on line 35
Warning: Supplied argument is not a valid MySQL result resource in /Library/WebServer/Documents/test.php on line 41
"
What's my issue? & How might I over come it?
All help is appreciated...
Jj
-
gosh-darn password stuff
2002-04-30 22:24:34 oldbenway [Reply | View]
Okay. So I did everything, it all worked fine, I complied my own SQL, set up the service so it starts when I boot- the last thing, I went to change the password for security.
The verbatim instructions in the tutorial did nothing (error) BUT then I notice that right above that, the final install command gave me a pointer:
PLEASE REMEMBER TO SET A PASSWORD FOR THE MySQL root USER !
This is done with:
"/usr/local/bin/mysqladmin -u root -p password 'new-password'
See the manual for more instructions."
Soooo I type it in (and below is trhe exact line grabbed from my terminal):
[localhost:/usr/local] donny% /usr/local/bin/mysqladmin -u root -p password 'yeahRight'
Enter password:
/usr/local/bin/mysqladmin: connect to server at 'localhost' failed
error: 'Access denied for user: 'root@localhost' (Using password: YES)'
So it seems to have created a password, but won't let me use it, whatever it may be- I know i messed things up, is there anyway to force a password reset in SQL????
Thanks for helpinging the Newb (who shouldn't be allowed to run a terminal)
-oldbenway@hotmail.com -
gosh-darn password stuff
2002-10-09 11:08:16 thaddaeus [Reply | View]
My problem is very similar...
after i am prompted to enter my password i THEN get.
mysqladmin: command not found.
that's kind of weird because im in /bin and I can see the executable in the directory.
every subsequent attempt resolved in a command not found right away.
i tried rehashing to no avail.
-
C compiler cannot create executables error
2002-04-27 17:01:09 dhtmlkitchen [Reply | View]
configure: error: installation or configuration problem: C compiler cannot create executables.
-How to deal with this problem?
-
Problem with chown
2002-04-26 15:11:04 mac@udigit.se [Reply | View]
When I issue the chown command I get this error. What does it mean?
sudo chown -R mysql /usr/local/var/*
sudo: No match.
/Mac
-
Incorrect chown statement
2002-04-26 00:16:18 clatko [Reply | View]
The article states the following line should be used to change ownership of the var directory and its contents:
sudo chown -R mysql /usr/local/var/*
Doing this, I was not able to successfully get mysqld to run. I had to change ownership of the var directory itself as well before mysql would start properly. This did the trick:
sudo chown -R mysql /usr/local/var -
Incorrect chown statement
2002-04-26 04:44:03 Kevin Hemenway |
[Reply | View]
This should be fixed in the article text soon.
-
error 1044 and 1045
2002-04-25 20:21:48 gaga1 [Reply | View]
No end of frustration with the "error 1044 and 1045 access denied" when I try to create a db in mysql. Permission denied. Sheesh.
I wrote Marc Liyanage (the package version of the MySQL download) and he said I need to ask my administrator for permission.
Uhh, it's my iBook dude. I think I should be OK for permissions.
Please, someone, tell me what's up? (I don't think it's a chmod g+w thing. If so, where is the file to change?)
Grateful should you answer this query. -
error 1044 and 1045
2002-04-26 04:38:38 Kevin Hemenway |
[Reply | View]
Marc has absolutely nothing to do with the configuration of your MySQL server, even if he did make the package, since the package is a doubleclickable for of the defaults chosen by the creators of MySQL - not Marc. As for permissions, it doesn't matter if you're the only user of the computer, or if the computer is only going to be a dev box - permissions exist and are strictly enforced in the Linux world. It takes a bit of getting used to, but in the long run, they make absolutely perfect sense.
The permissions in question have nothing to do with file permissions, like chmod or chown - they're related to the permissions that you need to modify the MySQL database. Again, it doesn't matter if you're the only person using it.
Technically, if you ran through the instructions in the article word for word, the package version should be running marvelously for you - most of the ambiguity lied in a source install. In any case, you can find a large number of possible solutions at the MySQL site. -
error 1044 and 1045...ok..but no CREATE
2002-04-26 06:49:02 gaga1 [Reply | View]
Much obliged for your response. Followed your lesson. Yep. Great. PHP works.
But nope. No indication of how to CREATE a database in MySQL. Your example uses the "test" db in the MYSQL pkg.
I still get 1044 when attempting to create a db in MySQL:
mysql> CREATE DATABASE gaga;
ERROR 1044: Access denied for user: '@localhost' to database 'gaga'
mysql>
Now what do to get "Access accepted" to create a new db?
Vexing.
-
error 1044 and 1045...ok..but no CREATE
2003-07-04 17:21:16 anonymous2 [Reply | View]
how do i get into the 'shell' .... -
error 1044 and 1045...ok..but no CREATE
2002-04-26 18:34:12 Kevin Hemenway |
[Reply | View]
Part 5 was intended to get MySQL up and running on your OS X box. It's not intended to teach you how to administer MySQL, or code SQL, or any of that stuff. So, your best bet is to get a book on MySQL, or start perusing MySQL tutorials around on the web. -
error 1044 and 1045...ok..but no CREATE
2002-04-26 20:49:58 gaga1 [Reply | View]
Much obliged once agan for your curt reminder. Now I've gone to a dozen websites on MySQL, all say different things, and all are very cryptic, and none address the issue.
Would it not suffice just to say "oh yeah, to create a database in MySQL you need to do X..., and be sure that you have done Y to get rid of that pesky 1044 access denied message"
Sheesh.
-
Found a correction to final commands
2002-04-07 22:58:37 fleafrier [Reply | View]
Hey all,
GREAT articles morbus. Keep them coming! Maybe and article on Tomcat?
Anyway, As a lot of people did, I was having trouble getting mysql to start. After rustling through the posts I noticed that you had suggested to one person to try running the command:
sudo chown -R mysql /usr/local/var
as well as the other sudo chown command.
This is what fixed it for me. Hope that helps someone!!
Go Morbus!! Keep the info flowing!
-
uninstall mysql?
2002-04-05 23:12:44 vaie [Reply | View]
I'm so brilliant that I forgot my mysql root password. Does anyone know how I can uninstall mysql and start over? I tried to install over itself, but that didn't work.
I used the binary version.
thanks! -
uninstall mysql?
2002-04-08 21:23:05 vaie [Reply | View]
No worries, I got it fixed! I forgot to mention in the original post that I had thought I uninstalled the binary version, and then had installed the source version, which just really messed things up.
After some down and dirty wrestling with things I have it working again.
And I have written down my password. *bows*
Thank you. -
Is it possible to uninstall source version?
2002-06-06 15:40:33 rdez378 [Reply | View]
This series was great. I did every step without any major problems. I was even successfully running Phpmyadmin until I deleted the root user by mistake. Now it says no users within phpmyadmn (already contacted them) and when I access mysql using the root password I am still able to login with no problem. However, when I try to administer to the databases or add new users i get the 1044/1045 errors. I've tried some of the fixes listed on mysql.com but with all of them I eventually get an access denied. What should I do?
I think my best bet is to uninstall mysql but i did it using the source version so i don't know of any script.
Would reinstalling apache work if worst came to worst?
I'm at my wit's end here. I'm usually able to find answers using forums like these or just following manual instructions but I don't think too many people would do something as stupid so that's why no info on it.
Anyone with any ideas let me know asap before i do something else more damaging to my system!
I'm operating Mac 10.1.4, Apache 1.3.22, and mysql 3.23.29 on the localhost.
Thanks!
-
What next?
2002-04-03 04:31:16 bovisart [Reply | View]
Maybe the place of WebObjects in it all?
And maybe 4th Dimension, JaneBuilder, Macromedia and others,
and do you really need them.....
Thanks sofar. Only stupid that OS X costs me money again. And more, that I don't have it now
I bought a far too expensive iMac (the original) with OS 8.1, had to pay for 8.5, 9.0 whole new again, beta'd X and just missed the free OS X 10.1.....Any tips how to proceed.
Thanks anyway so far. Conny. -
What next?
2002-04-27 18:34:11 dhtmlkitchen [Reply | View]
I could let you borrow my cd (to try out for intellectual purposes), but I really need help getting mySQL to work.
I have done the Marc Liyanages' tutorial and also the one one developer.apple.com, and also this one --none of them worked! If you had a different result and you wanna help me out, I'll let you borrow my copy of 10.1.
You can contact me. I don't wanna post my email address (robots and spammers will pick it up), but my site is dhtmlkitchen, so you can send email there. -
What next?
2002-04-16 17:29:36 Kevin Hemenway |
[Reply | View]
We'll be staying pretty close to Apache in future additions to the series (another two are planned). We won't be getting into GoLive or WebObjects (or, at least, I won't).
As for OS X costing money, I was more than happy to wait on a cold rainy morning to get my copy. The very thought that a *nix and my beloved Perl would be installed by default... god... talk about sweaty palms. -
What next?
2002-04-27 18:31:13 dhtmlkitchen [Reply | View]
I could let you borrow my cd (to try out for intellectual purposes), but I really need help getting mySQL to work.
I have done the Marc Liyanages' tutorial and also the one one developer.apple.com, and also this one --none of them worked! If you had a different result and you wanna help me out, I'll let you borrow my copy of 10.1.
OS X does cost too much.
-
Can't connect .. compiled .. stuck on 2nd
2002-03-31 19:26:32 pangur [Reply | View]
(Thanks for the articles--terrific series.)
Getting error:
Can't connect to local MySQL server through socket '/tmp/mysql.sock' (61)
Going the compile route, I had problems with item 2 (sudo chown -R mysql...) and the permissions remain:
drwx------ 5 mysql wheel 264 Mar 31 18:54 var
Reading the messages, I tried "ps auwx" and see no mention of MySQL.
Anticipating that I may need to start over, (and excuse my ignorance), do I need to somehow remove all the installed files in order to run thru this again?
Thanks very much......
-
Can't connect .. compiled .. stuck on 2nd
2002-04-01 20:53:47 pangur [Reply | View]
Well--unless I totally gerflunked everything, it appears to be functioning now (I got the "must stay awake" message).....by logging back in as MySQL user and at Terminal entering the 3 commands from the end of page 2 of part 5. Thanks again for a great series!
-
Access Denied error
2002-03-25 09:34:42 pedrox [Reply | View]
Warning: Access denied for user: 'root@localhost' (Using password: NO) in /Library/WebServer/Documents/test.php on line 13
Warning: MySQL Connection Failed: Access denied for user: 'root@localhost' (Using password: NO)
in /Library/WebServer/Documents/test.php on line 13
Warning: Access denied for user: 'root@localhost' (Using password: NO) in /Library/WebServer/Documents/test.php on line 17
Warning: MySQL Connection Failed: Access denied for user: 'root@localhost' (Using password: NO)
in /Library/WebServer/Documents/test.php on line 17
Warning: MySQL: A link to the server could not be established in /Library/WebServer/Documents/test.php on line 17
Access denied for user: 'root@localhost' (Using password: NO)
Any Ideas of what I need to do to get this running?
-
Adobe Golive 6 - How To - Please...
2002-03-25 07:44:53 redleader [Reply | View]
Hi kevin,
Can we please have a short artcile on connecting Adobe Golive 6 to our mySQL / PHP setup as per your articles.
I guess most of us will be developing on the same Mac as we've done your setup's here.
The GL6 manual is a bit fuzzy and we seem to get access restrictions when connecting to mySQL via. Golive. and creating GL's PHP control files.
I'm sure it's just an IP / Apache config thingy...but I'm a blind newbie..
:-) Thanks. -
Adobe Golive 6 - How To - Please...
2002-04-24 09:46:51 medazinol [Reply | View]
Getting Golive 6 to work with MySQL is a bit tricky. You really need to be familiar with MySQL grant tables to get the connection to work properly.
The main thing is to run the Dynamic Content Wizard and enter the ip address of the machine running MySQL FOLLOWED by the MySQL port number (3306) like this: 127.0.0.1:3306
I fyou used this tutorial to get MySQL up and running then use "root" as the username and the password you assigned to the root account in MySQL. Actually, its NEVER a good idea to log into MySQL as root so you really should create a specific user but for local development you should be OK. Search for "GRANT PRIVILEGES" on the mysql documentation website (www.mysql.com) for more on how to set up access permissions in MySQL. if you succeed in getting Golive to connect you'll get a small window showing you a list of the tables installed.
Hope this helps!
-
OT:: mod_perl
2002-03-24 21:39:53 kenyatta [Reply | View]
Hello Kevin, it's time can we do a tutorial for an installation of mod_perl on Apache for Mac OSX?
There is currently a nice tutorial for installing mod_perl on Oreillynet.com but it doesn't cover the Mac OSX particulars.
Thanks Kevin!! You already helped me with so much already!! -
OT:: mod_perl
2002-03-29 14:10:36 Kevin Hemenway |
[Reply | View]
Ultimately, mod_perl is already installed on OS X. Look in your httpd.conf file - you'll see a large listing of AddModule and LoadModule lines, and one of them will be related to Perl. Uncomment them, and all other instructions on configuring mod_perl will work as written (well, assuming you change file/directory paths).
-
Darwin Streaming Server w/ Apache
2002-03-19 02:17:17 lauren1 [Reply | View]
Now that I've got my Apache Web Server up & running I'd like a look at integrating it with the Darwin Streaming Server
-
still having trouble with cgi
2002-03-15 21:50:12 bdoltens [Reply | View]
sorry, i posted this on part 4 already
Can someone please help me?
I can successfully run the test-cgi from my browser, but a downloaded perldiver.cgi will not run.
I desired to use /Users/bdoltens/Sites/cgi-bin as a folder for cgi scripts, so I made a
<Directory "/Users/bdoltens/Sites/cgi-bin">
Options ExecCGI
AllowOverride None
Order allow,deny
Allow from all
</Directory>
just after the <Directory /> bit in httpd.conf. Addhandler cgi-script .cgi is uncommented. ScriptAlias is commented out.
by typing perl /Users/bdoltens/Sites/cgi-bin/perldiver.cgi in the terminal, the program runs and outputs good html. Still, the browser reports a 500 when I attempt to access the script.
i have chmoded the file as 755, or 775, and, not really understanding the specifics of chmod, i tried also "a+w," but nothing really works.
the error_log tells me two things,
(2)No such file or directory: exec of /Users/bdoltens/Sites/cgi-bin/perldiver.cgi failed
and then, premature script headers.
Thanks for listening. Great articles, even if I don't fix this it was fun using the terminal for something. -
still having trouble with cgi
2002-03-19 14:10:32 Kevin Hemenway |
[Reply | View]
You say the perldiver.cgi script outputs good HTML on the command line - but, but, but, when run as a CGI, it absolutely *needs* to output:
"Content-type: text/html\n\n"
before, before, before any other output to the browser. If you do not output that text, then the browser has no flipping clue what data is coming to it, so it will return an error) about premature script headers.
Generically though, "premature script headers" could be any number of problems, only one of which could be missing that Content-type line. To further debug your problem, check out the various documents at Debugging Perl - About.com (but be prepared for tons of popup advertisements).
-
mysqladmin: Command not found
2002-03-13 19:17:39 devereld [Reply | View]
All's well until the ending. Where does this command exist (package installation)? Do I have to add it? -
mysqladmin: Command not found
2002-03-13 20:25:23 Kevin Hemenway |
[Reply | View]
The package installation plops this file into /usr/local/bin/mysqladmin. /usr/local/bin should be in your PATH already (meaning you don't have to specify the full path to the program), but if not, you can certainly do "/usr/local/bin/mysqladmin" without a problem.
Or, you could "cd /usr/local/bin" and then run the "mysqladmin" command as shown. -
Thanks, but needed to add sudo...
2002-03-14 15:29:43 devereld [Reply | View]
...prior to the command in order to get it to work. Managed to complete the (very well done) tutorial. Thanks again. -
Thanks, but needed to add sudo...tryed that no joy
2005-05-24 04:08:44 pixel_wolf [Reply | View]
[kirsten-wolfs-Computer:/usr/local/bin] wolf% sudo/usr/local/bin/mysqladmin
tcsh: sudo/usr/local/bin/mysqladmin: Command not found.
[kirsten-wolfs-Computer:/usr/local/bin] wolf% sudo mysqladmin
Password:
sudo: mysqladmin: command not found
[kirsten-wolfs-Computer:/usr/local/bin] wolf%
still comand not found- the php test is working- notes came up per tutorial but no joy with this command - how can i configure my sql - -
Thanks, but needed to add sudo...
2002-04-24 09:50:30 medazinol [Reply | View]
Sometimes when you install new command line programs in OS X, the terminal (command line) will not know about the new software. Provided your shell profile has the required paths in it you can simply type:
rehash
in the terminal to get the shell to cache the changes...
-
MySQL won't start
2002-03-13 17:16:40 saywake [Reply | View]
Here's the 'localhost.err' lines everytime I try to start it....I'm pretty certain that I've done all the steps (including adding the mysql user). Thoughts?
020313 20:11:08 mysqld started
Cannot initialize InnoDB as 'innodb_data_file_path' is not set.
If you do not want to use transactional InnoDB tables, add a line
skip-innodb
to the [mysqld] section of init parameters in your my.cnf
or my.ini. If you want to use InnoDB tables, add for example,
innodb_data_file_path = ibdata1:30M
But to get good performance you should adjust for your hardware
the InnoDB startup options listed in section 2 at
http://www.innodb.com/ibman.html
020313 20:11:08 /usr/local/libexec/mysqld: Can't create/write to file '/usr/local/var/localhost.pid' (Errcode: 13)
020313 20:11:08 /usr/local/libexec/mysqld: Can't find file: './mysql/host.frm' (errno: 13)
020313 20:11:08 /usr/local/libexec/mysqld: Error on delete of '/usr/local/var/localhost.pid' (Errcode: 13)
020313 20:11:08 mysqld ended
-
MySQL won't start
2002-03-13 20:28:10 Kevin Hemenway |
[Reply | View]
Hmm. I'm wondering if one of the steps needs a slight modification. Do this for me and let me know if it works for you, please. If so, I'll get the article corrected.
sudo chown -R mysql /usr/local/var
This is a minor change from the article currently says, but may be crucial to what your problem is. Let me know. -
MySQL won't start
2002-03-13 18:42:34 andycrim1 [Reply | View]
It looks like we have the same problem. I followed the instructions to the letter, and I am puzzled that I can't get mysql to work. I have been trying to get it installed for about a week. I've tried fink and the binary distro from Marc Liyanage, but to no avail.
I'll probably try one more time from source code. -
MySQL won't start - one more thing
2002-03-13 18:32:08 saywake [Reply | View]
when I first run the mysql_install_db, I get this error:
[localhost:/usr/local] root# ./bin/mysql_install_db
Preparing db table
Preparing host table
Preparing user table
Preparing func table
Preparing tables_priv table
Preparing columns_priv table
Installing all prepared tables
ERROR: 1062 Duplicate entry 'localhost-root' for key 1
ERROR: 1062 Duplicate entry 'localhost-root' for key 1
020313 21:26:36 /usr/local/libexec/mysqld: Shutdown Complete
This has happened on 2 separate attempts on 2 different machines...what am I doing wrong? -
MySQL won't start - one more thing
2002-03-13 20:30:31 Kevin Hemenway |
[Reply | View]
The "Duplicate entry" error message isn't too worrisome - I saw it on my own machine initially as well. Basically, one of the things that the install_db script does is to give the local user (you) access to the database. This error message is saying you already have access to the database. It's nothing you're doing wrong, and the error message you reported in an earlier message wouldn't be affected by this.
-
TOP NOTCH Articles
2002-03-13 13:45:17 dejesusivan [Reply | View]
... Very much worthy of being part of the O'Reilly network. Thank you!!
-
what about jdbc driver?
2002-03-13 11:19:13 axel_vogelsang [Reply | View]
i tried to use dbvisualizer as a gui for controlling my databases. where do i install my jdbc driver and which one should i take. thanks
-
errcode: 13
2002-03-13 08:09:59 andycrim1 [Reply | View]
I can't get mysql to launch.
The localhost.err file states:
/usr/local/libexec/mysqld: Can't create/write to file '/usr/local/var/localhost.pid' (Errcode: 13)
/usr/local/libexec/mysqld: Can't find file: './mysql/host.frm' (errno: 13)
/usr/local/libexec/mysqld: Error on delete of '/usr/local/var/localhost.pid' (Errcode: 13)
mysqld ended
Thanks for the great series. -
errcode: 13
2002-03-13 20:32:02 Kevin Hemenway |
[Reply | View]
Please see the reply in the other thread - either way, let me know if it works.
-
Do it over again with Perl
2002-03-12 12:56:52 dicklacara [Reply | View]
I was so encouraged by the results of your excellent tutorial on pHp/mySQL... I took a shot at "installing" mySQL for Perl... no success.
I have done some web programming in Perl, but never was involved with the install side of things,
A short tutorial on adding mySQL to the OS X Perl package woukd be appreciated.
Maybe, someday we'll have ColdFusion on OS X!
Dick -
Do it over again with Perl
2002-03-13 20:51:56 Kevin Hemenway |
[Reply | View]
Ultimately, you'll want to either look at or join the osx@perl.org list. You can see the archives here (there are some mentions of DBI).
I've gone through a lot of Perl installations on my perl box, so, in my case, I just had to:
sudo perl -MCPAN -eshell
install Bundle::DBD::mysql
Sat through a few errors, and when things were all finished, this script worked correctly (it assumes the database has been created as per the PHP script, and that some data has been entered).
#!/usr/bin/perl
use DBI;
$dsn = "DBI:mysql:database=test;host=127.0.0.1;";
$dbh = DBI->connect($dsn, "root", "");
$sth = $dbh->prepare("SELECT * FROM wisdom");
$sth->execute;
while (my $ref = $sth->fetchrow_hashref()) {
print "$ref->{'id'}: $ref->{'author'} sez: $ref->{'wisdom'}\n";
}
$sth->finish;
-
Do it over again with Perl
2002-03-18 19:45:57 gskluzacek [Reply | View]
what does the 2 lines below do?
sudo perl -MCPAN -eshell
install Bundle::DBD::mysql
The 2nd one looks to install the mysql database driver for dbi, but the 1st one I'm clueless on. Is there something similar to instal the acutal DBI module? Thanks.
Greg Skluzacek
gskluzacek@mac.com -
Do it over again with Perl
2002-03-19 14:04:21 Kevin Hemenway |
[Reply | View]
"sudo" says to run the next command as the root user. "perl" starts the perl interpreter, and automatically loads in a module called "CPAN" ("-MCPAN" is equivalent to "use CPAN;"). Finally, "-e" is the "execute this perl code" command, and we're saying to execute the "shell" command of CPAN.
The second command installs the actual module. If you know your module name, you can use it - so "install XML::Parser", "install LWP::Simple", "install DBI::mysql", and so on and so forth. If you do the "Bundle::DBD::mysql" as above, then you don't have to worry about installing the matching DBI module - it's contained within this "Bundle".
-
FastCGI on OS X?
2002-03-11 19:59:41 juicy [Reply | View]
Any plans to add a FastCGI tutorial? As much as I love PHP, I do have projects that require Perl and FastCGI work, as well. I've tried to get mod_fastcgi and its Perl friends, FCGI.pm and CGI::Fast, to play together. But no luck so far.
You seem to be the man who can do it. This series is great. I'd love to see FastCGI covered in a future installment!
Keep up the great educating!
-B...
-
MySQL problems
2002-03-11 18:24:34 spiffyman [Reply | View]
Once again, thanks for a great article. However, I'm having problems with the source install of MySQL.
After downloading the file you pointed to with Internet Explorer, the actual name of the file was download.php. Because of that, tar (gzip?) didn't want to unpack the file, so Stuffit Expander did. So I was unsure as to whether I should move the resulting folder to /usr/local/src/ or not. (If so, I didn't, and how do I do that? cp doesn't seem to create the directory necessary in /usr/local/src/)
Anyhow, I ran the ./configure options and it went fine, but when make finished, I got the following line at the end:
make[2]: Nothing to be done for `all-am'.
There weren't any other error reports that I could see, but then, maybe I did miss something. When I ran sudo make install, I got this line at the top and throughout the output as well as several lines with `install-data-am' instead:
make[2]: Nothing to be done for `install-exec-am'.
And these lines at the bottom:
make[2]: *** [install-binPROGRAMS] Error 1
make[1]: *** [install-am] Error 2
make: *** [install-recursive] Error 1
Now, when I go to /usr/local/, sudo ./bin/mysql_install_db produces a command not found error.
I suspect there was some sort of problem in the make or make install commands, but if I find a solution, I'll still need to know what to move or remove so a reinstall goes smoothly. Thanks for your help.
-
MySQL problems
2002-06-30 04:19:01 mrx1 [Reply | View]
Well, it's an old post and I bet you got it working since then but it might be useful to others... In general, when I get those stupid "download.php" names, I look at the real name of the file I downloaded (easily enough by double clicking on the dl in the dl manager in IE5, but the way you get it doesn't matter, as long as you find the exact dl path with the name of the file at the end) and just copy and paste it to the downloaded file (replacing the "download.php"), say "yes" when the Finder asks if you wanna change the extension from .php to whatever your file's in... stuffit should now recognize your file and you should be able to do whatever you need with it. Cheers.
-
PHP again
2002-03-11 14:55:50 bici [Reply | View]
is php part of the apache install that comes with OS X (10.x.x0 or does one need to install the php programs???
i suspect because i could not get the script to work that i do not have php installed. how can i determine if php is available on my machine? -
PHP again
2002-03-11 16:42:58 Kevin Hemenway |
[Reply | View]
Yes, PHP is installed by default. If this is your first time reading this series, then you probably don't have PHP turned on. Read part three of the series for information on that.
-
php
2002-03-11 14:51:15 bici [Reply | View]
does the php scrip need to shart with
php
or will it work without that addition? -
php
2002-03-11 16:41:22 Kevin Hemenway |
[Reply | View]
I think something's missing from your comment, but the example listed in the article is a full script - if you save it as with a .php extension, then you'll be able to run it just fine.
-
OSXGuide.com
2002-03-11 07:09:06 dani0100 [Reply | View]
Great article here. If anyone's looking for similar guides on fun things to do with OS X, drop by www.OSXGuide.com for news, views, guides, and an OS X only forum.
http://www.osxguide.com
I'd be interested in seeing something on cool tricks using PHP and MySQL on OS X. That's next on my list of Guides to creat.
Thanks!
Miguel Danielson -
OSXGuide.com
2002-03-12 09:36:50 swanilda [Reply | View]
I agree with the request for the next lesson: a guide to using MySQL with PHP on OSX. I managed to stumble through this lesson and get things working according to directions, but I am not sure I understand what to do with it next. I did a SQL tutorial (with online SQL interpreter), but where does one actually create the tables using the SQL commands...right in the terminal? In a text editor? In combo with php as .php document that goes on the server? Forgive the dumb questions...this is all so new!
Thanks for your generosity in creating these detailed lessons.
Sheri -
OSXGuide.com
2002-03-12 10:56:31 swanilda [Reply | View]
Well, upon a little more investigation, I think I found answers to my questions...which are actually all answered in the affirmative. You can use all of these tools. I did manage to figure out that when I get the mysql> screen, that's where I begin entering CREATE table "name" and the columns, contraints, values. So...I made my first database in the terminal. I would still love to see more tricks such as the OSX Guide person requested. Thanks again for a great tutorial!
Sheri
-
"Can't connect to mysql.."
2002-03-10 05:00:04 dbartlett [Reply | View]
When i run the script i get an error message;
"Warning: Can't connect to local MySQL server through socket '/tmp/mysql.sock' (2) in /Library/WebServer/Documents/test.php on line 4"
Can anyone suggest a solution ? Sure its just a silly mistake on my part. -
"Can't connect to mysql.."
2002-03-13 21:35:47 rjolly@cape.com [Reply | View]
Warning: Can't connect to local MySQL server through socket '/tmp/mysql.sock' (2) in...
I get this error message too - I think because I can't actually start mysql, or it stops immediately after starting:
% sudo ./bin/safe_mysqld -user=mysql &
Starting mysqld daemon with databases from /usr/local/var
020314 00:27:53 mysqld ended
I don't get the command prompt back after running the safe_mysqld command ( I interrupt it with a crtl-c), unless I drop that trailing '&' argument. (Which I couldn't find it in the man page.)
But with or without the ampersand, the results are the same.
I tried ps auwx - mysql doesn't show up.
Any ideas?
And thanks for the very helpful series! -
"Can't connect to mysql.."
2002-03-11 08:17:45 Kevin Hemenway |
[Reply | View]
This error would come up if you hadn't started the MySQL server, or else, when you tried, you got error messages. Could you rerun through the steps to start MySQL (they're the last few lines of code on page 2) and pay attention to what happens?
If everything looks fine, you can verify that MySQL is running by entering "ps auwx" in your Terminal - you should see some mention of MySQL if everything went smoothly. -
"Can't connect to mysql.."
2002-03-12 16:05:21 curran_riley [Reply | View]
I too am getting this (on a home pc - work pc install went off without a hitch).
I've gone through the steps a couple of times now - but when I enter the third command for the package install, I get:
Starting mysqld daemon with databases from /usr/local/mysql/data
./bin/safe_mysqld: command not found: tee [275]
./bin/safe_mysqld: command not found: tee [276]
I must be missing something - but I've created the mysql user, run the package install, and executed the first 2 commands. But something about that 3rd one doesn't go. Any ideas?
The error log has entries like this:
020312 17:58:03 mysqld started
./bin/safe_mysqld: command not found: nohup [235]
P.S. - great series of articles - love having Apache, CGI, and PHP running with so little effort!
-
And Mac OS X Server?
2002-03-09 07:03:08 maxs [Reply | View]
I am using Mac OS X Server 10.1.3 but I'm having some problems after installing the packaged version of MySQL....
Probably because in the Server version of Mac OS X ther's already a pre-bundled MySQL version and there are some conflicts?
Thank you -
And Mac OS X Server?
2002-03-11 08:14:31 Kevin Hemenway |
[Reply | View]
There quite possibly could be, yes. At the very least, if the Server version of MySQL was still running when you tried to turn on your version of MySQL, then there'd be conflicts. These instructions assume plain old OS X - not OS X Server. -
And Mac OS X Server?
2002-04-29 09:13:24 cybersank [Reply | View]
I was able to install on OS X Server as well.
Apple previously noted that MySQL would be part pf the system, but you only get it if you're installing a fresh copy of 10.1 Server. If you updated the Server version (like I did) from 10.0 then you only get Tomcat.
PS.
I had problems starting the Mysql Server and fixed by adding a ' * ' at the end of the line:
sudo chown -R mysql /usr/local/mysql/*
-
One missing sudo?
2002-03-08 22:14:44 pmccann [Reply | View]
Anyone compiling from source will want to chuck a "sudo" before the "make install" command if they want to avoid a terminal full of angry looking "permission denied" statements. That is, the third of the triumvirate "./configure; make; make install", should actually be
sudo make install
Cheers,
Paul -
One missing sudo?
2002-03-11 08:12:12 Kevin Hemenway |
[Reply | View]
Paul,
You're absolutely correct. Sorry about that - I'll get it changed in the article some time today hopefully.
Nice word, btw (triumvirate). It fits.






I had a similar problem to those posted below, with the following output from the php file:
Can't connect to local MySQL server through socket '/var/mysql/mysql.sock' (2)
and various other problems. Finally i have managed to make it work.
Did this by simply creating the directory structure and moving the mysql.sock file from the /tmp directory into the newly created directory. The commands i used are:
sudo mkdir -p mysql
cd /tmp
sudo mv mysql.sock /var/mysql/
And as if by magic, it worked - and the 4 hours spent on it seem a little less wasted!
Fantastic articles, the only useful tutorials on this subject that i've found!
Jeremy