Problem installing MySQL on OSX Leopard


I've been looking around for hours and can't find the answer.

Whenever I try to start mysql on OSX it ends immediately:

sudo /usr/local/mysql/bin/safe_mysqld
Starting mysqld daemon with databases from /usr/local/mysql/data
STOPPING server from pid file /usr/local/mysql/data/ME-computer.local.pid
080117 02:03:49 mysqld ended

In the error it says that the port (3306) is in use, and when I telnet localhost 3306 it says connection refused, but when I do the same with 127.0.0.1 3306 it goes through fine. I'm kind of a noob to Unix and this is driving me crazy. I have no idea where to go from here

(If it's relevant, I "installed" PHP by uncommenting the httpd.conf file and added something to the hosts file for virtual servers, though that doesn't seem to affect anything)

Any advice
Posted On: Monday 29th of October 2012 05:57:27 AM Total Views:  77
View Complete with Replies

RELATED TOPICS OF MYSQL PROGRAMMING LANGUAGE




Tricky (to me) SQL problem

Okay, I haven't been able to puzzle this out on my own, so here I am begging help. The data: two tables. One has a list of unique node names as text, as well as x, y and z coordinates for each. The other table is a list of pairs of node names indicating they are connected. It's possible some names don't exist in the first table (in that case I just want to skip that whole row). There are many duplicates in a given column as, say, one node could be connected to three or four others. What I'm trying to do is compose a query to get a set of x1, y1, z1, x2, y2, z2, but based only on the valid pairs (where both names listed in a pair in the second table actually exist in the first table). I'm not even sure this can be done in one query, but I'm a newbie to SQL so can't be sure. My attempts thus far explode into horribly huge results (like cancel after getting tired of waiting huge), where at most there should only be as many rows in the return as there are rows of pairs in the second table.
VIEWS ON THIS POST

192

Posted on:

Monday 29th October 2012
View Replies!

Insert with select and additional values query problem

Can I request some guidelines. I am trying to insert 2 values from a table in to another table and in addition am trying to pass 3 other values. The below query gives an error. Code: insert into tblverify (contactID_vfy,contactname_vfy,verifier,verify_date,verify_action) values ((select contactID,contactname from tblcontactname where contactID = '14'),'1',now(),'VERIFY') Error : #1136 - Column count doesn't match value count at row 1 PS: The table tblverify has a primary auto_number ID field in addition to above which is not included in the above query.
VIEWS ON THIS POST

142

Posted on:

Monday 29th October 2012
View Replies!

Mysql.sock problem

Installed MySQL on FreBSD O/S 7.2 /usr/local/bin/mysqld_safe & fails to start server ===> Code: 091230 00:03:00 mysqld_safe Logging to '/var/db/mysql/uf3.ax-lall.err'. 091230 00:03:00 mysqld_safe Starting mysqld daemon with databases from /var/db/mysql 091230 00:03:00 mysqld_safe mysqld from pid file /var/db/mysql/uf3.ax-lall.com.pid ended mysql -v ===> Code: ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/usr/tmp/mysql.sock' how is this corrected
VIEWS ON THIS POST

78

Posted on:

Monday 29th October 2012
View Replies!

Passing arguments to stored function problem

How to pass a string array to stored function as a single argument I need to use that string array in function in query like this: Code: SELECT value FROM table_name WHERE condition IN (string array) I'd tried to concat input string but with no success. Any suggestions
VIEWS ON THIS POST

87

Posted on:

Monday 29th October 2012
View Replies!

MySQL problems on Mac OS X

all, I currently find myself in a maddening frustration with trying to get mySQL to work properly with php/apache. So for awhile, I was trying to install the package on my OSX Leopard, and kept running into mysqladmin/mysql not being recognized as commands in the shell. I modified my PATH pointer and got it to start working and set root passwords and everything. But, according to phpmyadmin, I seemed to be getting some weird errors so I decided to wipe everything and install mysql again. Code: Invalid server index: "" Cannot load mcrypt extension. Please check your PHP configuration. The configuration file now needs a secret passphrase (blowfish_secret) Just to check that everything should be 'gone' I attempted to log in to phpmyadmin with my set root and my password I set a little bit ago before wiping down everything. Somehow, it still logs in which seems to point to that there's some other rogue mysql stuff roaming around.. And this error in particular Code: Your PHP MySQL library version 5.0.67 differs from your MySQL server version 5.1.36. This may cause unpredictable behavior. is boggling my mind. Any help I don't understand how phpmyadmin is still logging into something that's not supposed to be existing anymore.. Also, for some reason, under server choice, I have two servers, which is actually one that's repeated.. Why is it doing this (first available dropdown choice is 'blah' and the second is exactly the same: 'blah') Why are there two server choices of the exact same thing
VIEWS ON THIS POST

207

Posted on:

Monday 29th October 2012
View Replies!

Having problems with JOINing related data in a single query

using mysql 5.0, i have four tables: Code: CREATE TABLE IF NOT EXISTS `survey_main` ( `smid` int(11) NOT NULL auto_increment, `cid` int(11) NOT NULL, `name` varchar(50) NOT NULL, PRIMARY KEY (`smid`) ) ENGINE=MyISAM DEFAULT CHARSET=latin1 AUTO_INCREMENT=2 ; CREATE TABLE IF NOT EXISTS `survey_questions` ( `sqid` int(11) NOT NULL auto_increment, `smid` int(11) NOT NULL, `question` varchar(200) NOT NULL, `question_type` varchar(10) NOT NULL, `question_order` int(11) NOT NULL, PRIMARY KEY (`sqid`) ) ENGINE=MyISAM DEFAULT CHARSET=latin1 AUTO_INCREMENT=6 ; CREATE TABLE IF NOT EXISTS `survey_question_answers` ( `sqaid` int(11) NOT NULL auto_increment, `sqid` int(11) NOT NULL, `subid` varchar(32) NOT NULL COMMENT 'md5 unique submission entries', `vc` varchar(100) NOT NULL COMMENT 'numbs, alphas', `txt` text NOT NULL COMMENT 'text', PRIMARY KEY (`sqaid`) ) ENGINE=MyISAM DEFAULT CHARSET=latin1 AUTO_INCREMENT=51 ; CREATE TABLE IF NOT EXISTS `survey_submitter` ( `ssid` int(11) NOT NULL auto_increment, `smid` int(11) NOT NULL, `org` varchar(50) NOT NULL, `first_name` varchar(20) NOT NULL, `last_name` varchar(20) NOT NULL, `timestamp` int(11) NOT NULL, PRIMARY KEY (`ssid`) ) ENGINE=MyISAM DEFAULT CHARSET=latin1 AUTO_INCREMENT=11 ; and the basic relational hierarchy is as follows: Code: smid = survey ids ssid = survey submitter ids sqid = survey questions ids sqaid = survey question answers ids smid / \ ssid sqid \ sqaid I've tried many different variations of the following query: Code: SELECT sqa.sqaid, sq.question, sqa.vc, sqa.txt, ss.first_name, ss.last_name, ss.timestamp FROM survey_question_answers sqa JOIN survey_questions sq ON ( sq.sqid = sqa.sqid ) JOIN survey_main sm ON ( sm.smid = sq.smid ) JOIN survey_submitter ss ON ( ss.smid = sm.smid ) WHERE sm.cid = '1' AND sm.smid = '1' ORDER BY sqa.sqaid, ss.timestamp but whenever i add that last join onto the sql statement, my query comes back in a fully-meshed resultset. i know that sounds weird but if i take out that very last join, it displays correctly but it's missing the information from the missing table. so, i'll add that final table join and then users are shown in the result set as answering their own questions in their surveys, but else's surveys as well! what i'm ultimately trying to accomplish is to get a resultset that looks something like (theoretical example): Code: [surveyname, surveysubmissionid, submittername, surveyquestion, surveyquestionanswer] basicsurvey, 1, tim, how old are u, 12 basicsurvey, 1, tim, where do u live, cali basicsurvey, 1, tim, how many sibs, 3 basicsurvey, 2, nancy, how old are u, 80 basicsurvey, 2, nancy, where do u live, tex basicsurvey, 2, nancy, how many sibs, 0 basicsurvey, 3, steve, how old are u, 55 basicsurvey, 3, steve, where do u live, ga basicsurvey, 3, steve, how many sibs, 2 but i keep ending up with stuff that looks like (actual example): Code: sqaid question vc txt first_name last_name timestamp 1 How satisfied are you with your ability to reach a... Very Satisifed cameron wilson 1238195393 1 How satisfied are you with your ability to reach a... Very Satisifed cameron wilson 1238195407 1 How satisfied are you with your ability to reach a... Very Satisifed jennifer stevens 1238195703 1 How satisfied are you with your ability to reach a... Very Satisifed jennifer stevens 1238195718 1 How satisfied are you with your ability to reach a... Very Satisifed jerry johnson 1238196065 1 How satisfied are you with your ability to reach a... Very Satisifed jerry johnson 1238196092 1 How satisfied are you with your ability to reach a... Very Satisifed stacey frey 1238196129 1 How satisfied are you with your ability to reach a... Very Satisifed sue mccabe 1238539027 1 How satisfied are you with your ability to reach a... Very Satisifed cameron wilson 1238629695 1 How satisfied are you with your ability to reach a... Very Satisifed cameron wilson 1238629764 2 How satisfied were you with our representative's l... Very Satisifed cameron wilson 1238195393 2 How satisfied were you with our representative's l... Very Satisifed cameron wilson 1238195407 2 How satisfied were you with our representative's l... Very Satisifed jennifer stevens 1238195703 2 How satisfied were you with our representative's l... Very Satisifed jennifer stevens 1238195718 2 How satisfied were you with our representative's l... Very Satisifed jerry johnson 1238196065 2 How satisfied were you with our representative's l... Very Satisifed jerry johnson 1238196092 please help!!!
VIEWS ON THIS POST

84

Posted on:

Monday 29th October 2012
View Replies!

Order by problem

hey , first of all im certainly no pro concerning mysql, got some basic knowledge and thats it. i need to write a query that gives me exactely 10 records (limit 10) there are some where clauses but they dont really matter for my problem its the order by that is bringing me into despair. i order on a rating field first (this is the most important) but then i want to order them withign this result on a language base. problem is the language field is a string containing 1 or more languages those people speak eg (en|f|it or just fr) what i want now i as query that gives me the results but ordered in a way all people knowing 1 lang eg nl first then on another lang eg en (problem is they have to be sorted on rating first so eg a nl speaking one with rating 4 has to be lower then a en speaking girl with rating 4.2 but whn they have same rating nl should be before dutch) my apologies for my bad english and my
VIEWS ON THIS POST

205

Posted on:

Monday 29th October 2012
View Replies!

Page 2 - SELECT pid where ( word = '123' AND word = '456') - problems

Quote: Originally Posted by r937 if all the ids are different for each word, and what you want is the ids of all the words that you pass in, then this is all you need -- Code: SELECT id FROM words WHERE word IN ('apple','ipod') And return nothing if one of the words don't exist
VIEWS ON THIS POST

87

Posted on:

Monday 29th October 2012
View Replies!

Migrating mssql to mysql problem

I am migrating a mssql database to a mysql with 'MySql Migration tool'. The mssql database has tables with colums of datatype 'text' which will be migrated as longtext. I have googled and I have tryed different character set and collations but I havn't succeeded to migrate the swedish letters , , and others for these columns. Example: 23_ndringar => 23_..ndringar (32 33 5F C3 84 6E 64 72 69 6E 67 61 72) ndringar => ...ndringar (EF BF BD 6E 64 72 69 6E 67 61 72) tillgg => till...gg (74 69 6C 6C EF BF BD 67 67) (E5) => most EF BF BD but sometimes C3 A5 (E4) => most EF BF BD but sometimes C3 A4 (F6) => most EF BF BD but sometimes C3 B6 (C5) => EF BF BD (C4) => EF BF BD (D6) => EF BF BD (E9) => EF BF BD (C9) => EF BF BD _(5F C5) => 5F EF BF BD _(5F C4) => most 5F EF BF BD or sometimes 5F C3 84 _(5F D6) => 5F EF BF BD Can any of you give me an idea how to solve this problem Best regards
VIEWS ON THIS POST

181

Posted on:

Monday 29th October 2012
View Replies!

System problem

I'm trying to create these tables: Code: CREATE TABLE AREA ( ID INTEGER UNSIGNED NOT NULL AUTO_INCREMENT, DESCRIPTION VARCHAR(64) NULL , PRIMARY KEY(ID)); CREATE TABLE CUSTOMER ( ID INTEGER UNSIGNED NOT NULL AUTO_INCREMENT, AREA_ID INTEGER UNSIGNED NOT NULL , NAME VARCHAR(64) NOT NULL , TELF1 VARCHAR(32) NULL , TELF2 VARCHAR(32) NULL , FAX VARCHAR(32) NULL , EMAIL VARCHAR(32) NULL , WEB VARCHAR(32) NULL , OBSERVATIONS VARCHAR NULL , ADDRESS VARCHAR(64) NULL , CITY VARCHAR(32) NULL , REGION VARCHAR(32) NULL , COUNTRY VARCHAR(32) NULL , PRIMARY KEY(ID), FOREIGN KEY(AREA_ID) REFERENCES AREA(ID) ON DELETE NO ACTION ON UPDATE NO ACTION); And MySQL dumps this message: Code: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'AREA(ID) ON DELETE NO ACTION ON UPDATE NO ACTION)' at line 17 Can you help me please
VIEWS ON THIS POST

92

Posted on:

Monday 29th October 2012
View Replies!

Multiple join query problem

I am trying to modify a working query to show another related field from another table. This is what is working: Code: SELECT techtbl.Lastname, techtbl.FirstName, itemtbl.ItemName, assignmenttbl.CheckedOutQty, assignmenttbl.Datecheckedout FROM assignmenttbl Inner Join techtbl ON assignmenttbl.OwnerID = techtbl.ID Inner Join itemtbl ON assignmenttbl.ItemOwnedID = itemtbl.ID ORDER BY techtbl.Lastname ASC i get this result Adkins Frank Wigets 1 2008-12-30 15:22:31 Adkins Frank Wigets 1 2008-12-30 15:22:32 So I see that this person has 1 items checked out. but i dont see a difference between the 2 so i want to add the serial number for each item. This is not working that way i wanted it to: Code: SELECT techtbl.Lastname, techtbl.FirstName, itemtbl.ItemName, assignmenttbl.CheckedOutQty, assignmenttbl.Datecheckedout, item_detail_tbl.SerialNumber FROM assignmenttbl Inner Join techtbl ON assignmenttbl.OwnerID = techtbl.ID Inner Join itemtbl ON assignmenttbl.ItemOwnedID = itemtbl.ID Inner Join item_detail_tbl ON item_detail_tbl.TechOwnerID = techtbl.ID ORDER BY techtbl.Lastname ASC this is the result: Dup records, i should only see 2 records with there serial number. Adkins Frank Wigets 1 2008-12-30 15:22:31 ZAXSCD Adkins Frank Wigets 1 2008-12-30 15:22:32 ZAXSCD Adkins Frank Wigets 1 2008-12-30 15:22:31 QAWSED Adkins Frank Wigets 1 2008-12-30 15:22:32 QAWSED
VIEWS ON THIS POST

72

Posted on:

Monday 29th October 2012
View Replies!

Select concat problem

hi , im having a slight problem with select concat and was hoping someone could tell me where im going wrong my code is as follows Code: SELECT concat( Firstname, ' ', lastname) AS single, staffID,StaffPhoto, Email, telephone, location,info,stafftitle,active,partner,ImageID,ImageTitle,ImageFile,ImageThumb,ImageThumb2 FROM staff left join staffimagegallery on staff.staffphoto = staffimagegallery.imageID WHERE Active = 1 and single Like " when ever i try to run it i get Microsoft OLE DB Provider for ODBC Drivers (0x80040E14) [MySQL][ODBC 3.51 Driver][mysqld-5.0.45-community-nt]Unknown column 'single' in 'where clause' it seems to work before i put the where statement in any help would be appreciated.
VIEWS ON THIS POST

73

Posted on:

Monday 29th October 2012
View Replies!

MYSQL ranking problem

I want to get a query like this - Given a list of names sorted by the letter A, tell me the numeric position of the name "jazajay". (Cheers Requinix ) What I have got is this, so almost there - PHP Code: SELECTNameFROMnamesWHERELEFT(Name,1)='A'ORDERBYName I then run a php for loop to loop through the results and find the right name at the right position. However I know MYSQL can preform this a bit quicker than PHP but I'm not sure how to proceed. Any takers
VIEWS ON THIS POST

87

Posted on:

Monday 29th October 2012
View Replies!

JOIN query problem

, I have a problem with the following sql query: $result = dbquery("SELECT * FROM ".$db_prefix."main_table JOIN ".$db_prefix."table2 ON ".$db_prefix."main_table.data_contact_id = ".$db_prefix."table2.data_contact_id JOIN ".$db_prefix."table3 ON ".$db_prefix."main_table.data_location_id = ".$db_prefix."table3.data_location_id JOIN ".$db_prefix."table4 ON ".$db_prefix."main_table.data_shelf_id = ".$db_prefix."table4.data_shelf_id JOIN ".$db_prefix."table5 ON ".$db_prefix."main_table.data_manuf_id = ".$db_prefix."table5.data_manuf_id WHERE ".$db_prefix."main_table.data_item_id='$data_item_id' ORDER BY ".$db_prefix."main_table.data_item_id ASC"); If there is matching data in every table, data is retrieved. But if for example table4 has no matching data, no data at all is retrieved. What could be the problem Thank you in advance, Laura
VIEWS ON THIS POST

85

Posted on:

Monday 29th October 2012
View Replies!

Report query problem

Im having a problem with writing an appropriate query for a report in my web application. I need it to extract data from three related tables: CAR( PK CAR_ID INT NOT NULL, TYPE VARCHAR NOT NULL) REPAIR_CENTRE( PK REPAIR_CENTRE_ID INT NOT NULL, NAME VARCHAR NOT NULL) CAR_REPAIR( PK CAR_REPAIR_ID INT NOT NULL, FK1 REPAIR_CENTRE_ID INT NOT NULL, FK2 CAR_ID INT NOT NULL, DATE_SEND DATE NOT NULL, DATE_RETURN DATE NOT NULL) INDEX UNIQUE(REPAIR_CENTRE_ID, CAR_ID, DATE_SEND) I need the report to display only availiable cars. Availible cars must have these characteristics: 1. if the CAR_REPAIR table is empty, diplays all entries from CAR table... 2. if car has multiple entries in the CAR_REPAIR table display ony the latest DATE_RETURN if its lower than todays date (SYSDATE), otherwise dont display that car... 3. dont display cars that are in the CAR_REPAIR table and have DATE_RETURN value of NULL I've been thinking about this for two days and didn't come to a satisfactory conclusion.
VIEWS ON THIS POST

86

Posted on:

Monday 29th October 2012
View Replies!

WHERE DATE(datetimefield) problem

I have two RHEL5 machines, both built & configured at the same time. Both have MySQL 5.0.45 installed and share an identical database. So - this query returns 334 on one machine, and 0 on the other: * SELECT COUNT(*) FROM mytable WHERE DATE(datetimefield) = '2008-05-05'; I put that in red, since it seems to be where the problem is. The strange thing is that both machines returned 334 yesterday. If I change the query (on the supposed broken box) to this: * SELECT COUNT(*) FROM mytable WHERE datetimefield LIKE '2008-05-05%'; I get 334. I realize there several ways of doing this, but I'm more interested in why, out of nowhere, MySQL decides not to allow WHERE DATE(datetimefield)=blah anymore. Ideas
VIEWS ON THIS POST

69

Posted on:

Monday 29th October 2012
View Replies!

Config problem, localhost OK, host not

I've clearly doing something wrong. I've installed MySql 5.0.51a-3ubuntu5.1-log on my laptop. (i've been an amateur sysadmin on linux with mysql for a decade). If I connect to it using "localhost" or no host name, it all works perfectly. If I specify a hostname, it fails. Code: mysql mysql works fine. Code: mysql mysql -h localhost works fine. Code: mysql mysql -h tools.pfarrell.com fails with ERROR 2003 (HY000): Can't connect to MySQL server on 'tools.pfarrell.com' (111) Of course, tools.pfarrell.com is the laptop; Localhost resolves as always to 127.0.0.1 and tools.pfarrell.com resolves to (172.16.4.72) which the wireless card's IP on the laptop. I don't know of any firewall on the box. A simple telnet test shows that nothing is listening to port 3306 with the name, i.e. Code: telnet localhost 3306 returns some server stuff but Code: telnet tools.pfarrell.com 3306 Trying 172.16.4.72... telnet: Unable to connect to remote host: Connection refused Thus I assume I have something configured wrong, but have no idea what.
VIEWS ON THIS POST

76

Posted on:

Monday 29th October 2012
View Replies!

Import of db problems

Hi , I have a database that has innodb tables with foreign keys. The export via phpmyadmin runs fine. When I try to import the db I receive foreign keys errors for tables that have a reliance on tables that come "after" it. The table structure is already in place, just that the tables are empty and I am trying to place the data in them. Am I exporting this incorrectly I have started doing this one table at a time, but that is a pain and slow. Is there another way Thank you for your time, oach
VIEWS ON THIS POST

103

Posted on:

Monday 29th October 2012
View Replies!

Match against problem... 'Other'??

Alright, someone please explain to me why this: Code: SELECT * FROM products WHERE MATCH(cat3) AGAINST('Apple' IN BOOLEAN MODE) works, and this: Code: SELECT * FROM products WHERE MATCH(cat3) AGAINST('Other' IN BOOLEAN MODE) doesn't I have 2 products, one has 'Apple' in cat3, and the other has 'Other' in cat3. There is absolutely NO difference other than that. Anyone
VIEWS ON THIS POST

64

Posted on:

Monday 29th October 2012
View Replies!

Yet another charset problem

So I have a slight problem with Charset and such like. Seems like a lot of people have done this type of thing. I have an old MySQL db (pre utf) that has collation latin_swedish_ci and is now running on a different server with updated MySQL that supports utf. Most of the tables are latin1_swedish_ci and contain utf9 data encoded as latin1 so I have strings like \t\t \t\t \t. Is there a good way to reencode the database so that is uses utf8 throughout and no data is lost or messed up I tried http://gentoo-wiki.com/TIP_Convert_latin1_to_UTF-8_in_MySQL (slightly modified as --insert-ignore --skip-set-charset options and the MAXPACKET commands gave errors) and it didn't seem to work. Any suggestions Also why did --insert-ignore etc fail, old version of mysqldump
VIEWS ON THIS POST

77

Posted on:

Monday 29th October 2012
View Replies!