SELECT by date plus get both next and last dates with data in it
Hello, Having some problems trying to get the correct data from MySQL. I need to grab a bunch of information based on a date the user selects (no problem there). However, this is an events type situation, where I want to give people an easy option to move forward or backwards through the data once the initial results have been displayed. Special note (the tricky part) Because this is an events type of situation, not all dates will actually have data available. SAMPLE DATA: id date info --- 1 2005-01-12 big event happened today 2 2005-01-15 some event happened today 3 2005-03-01 a birthday happened today 4 2005-03-10 another birthday here Eg., User selects (March 1, 2005) We display the information from March 1, 2005. On that page, I want to be able to display a NEXT EVENT and a PREVIOUS EVENT option via simply html links. If user clicks NEXT EVENT it should know to get the data from 2005-03-10 and if the user clicks PREVIOUS EVENT, then they'll get the information from the 2005-01-15 event. Any help would be appreciated. Thanks _ On the road to retirement? Check out MSN Life Events for advice on how to get there! http://lifeevents.msn.com/category.aspx?cid=Retirement -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
effective handling of fuzzy dates (MySQL/PHP)
Hello, Please excuse me if this has been posted in the wrong spot. I'm storing historical information in a MySQL database and am using the date field formatted in -MM-DD. For the most part, the data entered is correct and uses the full -MM-DD format, however, I've got numerous dates that are incomplete. For example: an event happened in 1967, but the exact month and day are not known. I've been storing that data, in other forms, as 1967-00-00 but now dropping it into MySQL, when extracting that information using PHP, I'm running into errors where a date like '1967-00-00' would be deemd as having occured in 1966? As far as the data goes, here's some sample dates that I need to be able to handle. AS ENTERED EQUIVILANT LONG FORM --- 1965-08-12 August 12, 1965 1965-08-00 August 1965 1965-00-00 1965 Is this an effective means of handling this? Are there better methods? How can I get PHP to properly convert those dates? (I am using the ADODB-TIME.PHP class library too to help avoid the 1970-01-01 date restrictions that PHP internally has) Thanks for your help! _ Dont just search. Find. Check out the new MSN Search! http://search.msn.click-url.com/go/onm00200636ave/direct/01/ -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
Re: system requirements for MySQL db requiring large selects
Thanks for your reply Brent. It was really useful. Looks like Opteron would be a good choice since there wont be several multiple queries at the same time but instead we will be happy if the single query runs fast. You had mentioned adding more RAM would help, how much RAM would be ideal ? Does the operating system and MySQL will be able to utilize all the RAM available? Regarding hard drives you mentioned SCSI drives in RAID set up, I was looking at 15000 rpm scsi drives (thats what the max rpm i could find), does these has to be in RAID 0 setup ? if so how many drives do you think would be good. Our data will not exceed 75 - 100 Gig. Thanks again Karthik --- Brent Baisley [EMAIL PROTECTED] wrote: Tough question since a lot of performance is dependent on how you structure your queries, your database design and indexing. But, going with what you provided... You have big tables, so you will want lots of RAM. That means a 64bit system like Opteron, Itanium or PowerPC based (ok and Xeon). PowerPC would mean running Linux or AIX, OSX won't really take advantage of 64bit until 10.4. If your queries are going to be scanning big chunks of the tables, the data won't be cached, so you want very fast disks setup in a RAID. SCSI or Fibrechannel would be good. Are you going to be having lots of simultaneous queries or sequential big queries? Opteron will give you better throughput, but Xeon will be better at multitasking (i.e. simultaneous queries). Opteron has it's own memory controller, so if you have a lot of calculations you'll be doing in RAM, that would be an excellent chip because of it's bandwidth between CPU and RAM. If money is no object, a Power5 (PowerPC) based system can scale pretty high, going well beyond dual or quad processors in a single box. On Jan 23, 2005, at 12:12 PM, why me wrote: We are looking for buying a new server for running MySQL database. The database is around 50-70G and individual tables run to 5 - 15 GB. There wont be any frequent updates instead we need maximum select performance. There will be multiple table joins to perform our query. I hope your experience will help us find a suitable server for our need. Information on what hardware to use including how many computers, processor, ram, hard drive spec would be helpful. Budget is not a constrain but performance (select) need to be high. I have heard MySQL is the best for fast and large selects, but is it worth looking at other database like Oracle? Thanks TM __ Do you Yahoo!? Yahoo! Mail - Easier than ever with enhanced search. Learn more. http://info.mail.yahoo.com/mail_250 -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe: http://lists.mysql.com/[EMAIL PROTECTED] -- Brent Baisley Systems Architect Landover Associates, Inc. Search Advisory Services for Advanced Technology Environments p: 212.759.6400/800.759.0577 __ Do you Yahoo!? Yahoo! Mail - Helps protect you from nasty viruses. http://promotions.yahoo.com/new_mail -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
system requirements for MySQL db requiring large selects
We are looking for buying a new server for running MySQL database. The database is around 50-70G and individual tables run to 5 - 15 GB. There wont be any frequent updates instead we need maximum select performance. There will be multiple table joins to perform our query. I hope your experience will help us find a suitable server for our need. Information on what hardware to use including how many computers, processor, ram, hard drive spec would be helpful. Budget is not a constrain but performance (select) need to be high. I have heard MySQL is the best for fast and large selects, but is it worth looking at other database like Oracle? Thanks TM __ Do you Yahoo!? Yahoo! Mail - Easier than ever with enhanced search. Learn more. http://info.mail.yahoo.com/mail_250 -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
system requirements for large selects
We are looking for buying a new server for running MySQL database. The database is around 50-70G and individual tables run to 5 - 15 GB. There wont be any frequent updates instead we need maximum select performance. There will be multiple table joins to perform our query. I hope your experience will help us find a suitable server for our need. Information on what hardware to use including how many computers, processor, ram, hard drive spec would be helpful. Budget is not a constrain but performance (select) need to be high. I have heard MySQL is the best for fast and large selects, but is it worth looking at other database like Oracle? Thanks TM __ Do you Yahoo!? Take Yahoo! Mail with you! Get it on your mobile phone. http://mobile.yahoo.com/maildemo -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
Re: privileges not updating
On Wednesday, July 2, 2003, at 04:42 AM, Victoria Reznichenko wrote: me [EMAIL PROTECTED] wrote: i have a strange thing going on - i'm trying to update privileges on some databases but it doesn't happened - even after flush privileges - according to the manual the changes with GRANT an REVOKE should take effect immediately but they don't. i'm using command line How did you exactly update privileges? Show me the output of SHOW GRANTS for those users. ok... here is the output of the show grants before i try to change the privileges: mysql show grants for [EMAIL PROTECTED]; +--- --+ | Grants for [EMAIL PROTECTED] | +--- --+ | GRANT USAGE ON *.* TO 'myuser'@'localhost' IDENTIFIED BY PASSWORD 'moo' | | GRANT SELECT, INSERT, UPDATE, DELETE, CREATE, DROP, INDEX, ALTER ON `mydb`.* TO 'myuser'@'localhost' | +--- --+ 4 rows in set (0.00 sec) to change the privileges for mydb - to add FILE - i do: mysql grant SELECT,INSERT,UPDATE,DELETE,CREATE,DROP,FILE,INDEX,ALTER on mydb.* to [EMAIL PROTECTED] this returns no errors after that i check privileges again: mysql show grants for [EMAIL PROTECTED]; and i get exactly the same output as before (see up).. if i try: mysql revoke INDEX on mydb to [EMAIL PROTECTED]; that one works - and if i grant it again - it works too... apparently the FILE privilege is not getting registered and i'm not sure why.. if any other suggestions - will be appreciated.. thanks... also if i create a database, grant privileges on it and then delete the db if i check grants - it still appears... It's normal behaviour: http://www.mysql.com/doc/en/GRANT.html -- For technical support contracts, goto https://order.mysql.com/?ref=ensita This email is sponsored by Ensita.net http://www.ensita.net/ __ ___ ___ __ / |/ /_ __/ __/ __ \/ /Victoria Reznichenko / /|_/ / // /\ \/ /_/ / /__ [EMAIL PROTECTED] /_/ /_/\_, /___/\___\_\___/ MySQL AB / Ensita.net ___/ www.mysql.com -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED] -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
privileges not updating
hi everybody, i have a strange thing going on - i'm trying to update privileges on some databases but it doesn't happened - even after flush privileges - according to the manual the changes with GRANT an REVOKE should take effect immediately but they don't. i'm using command line also if i create a database, grant privileges on it and then delete the db if i check grants - it still appears... what might be wrong? where should i look? the mysql is 4.0.13 on a redhat 8.0 box... thanks... -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
CREATE TABLE with date as part of table name
I would like to know how to create a table within MySQL at the command prompt where the table name will be something like: MyTableName_TodaysDate Is this possible while at the command prompt? I am trying to create a batch file that will create a table in MySQL based on todays date. The system I am working on at the moment is Win2k. Thanks, Todd Routhier Lightwave Technologies, LLC. -- Start Your Own ISP! http://www.YourOwnISP.com
Lost connection to MySQL server during query
Hello After a reboot, the database server running Redhat 7.2 and mySQL 3.23.41-1 started acting funny. When I try to telnet to port 3306 of the server, nothing happens and when i check in the log file for mysql, i get something like: Number of processes running now: 1 mysqld process hanging, pid 11437 - killed 021012 01:24:09 mysqld restarted /usr/libexec/mysqld: ready for connections (It looks like mysql crash when i connect) At the start, i had no clue what was going on, i checked all the tables with myisamchk. No errors found. I had a secound server, with Redhat 7.3 and mySQL. I don't know how smart this is, but i deletet /var/lib/mysql/* and replaced the files with the ones from the other server.(Containing the database data). Now, the same problem was on that server. (As on the other, with the error message: Lost connection to server during query ) I removed the /var/lib/mysql/* files again, and replaced them with the old backup, and restarted mySQL. Still the same problem. (Lost connection..) I now deletet all the mysql rpm's (and deletet /var/log/mysql/*) and reinstalled them. Still the same problem. Im not a guru or anything, but for me it looks like it act like a virus. (As i can't find any solution). The thing is: I can use the mysql client and login to localhost (mysql -u root -p -h localhost) but if i use the server ip, i get the lost connection error. Don't know if this is a bug, or what it is, but if you could help, i would be greatfull. Best regards. Øystein - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
Creation query problem!!
Hello, will someone please point out what I am missing here for these creation query, one uses backquotes, while the other does not, for some reason, the one without back quotes errors!! What am i missing?? Is there a reserved word I am missing?? MySQL 3.23.41 CREATE TABLE email ( emailid int(11) NOT NULL auto_increment, oprid varchar(50) NOT NULL default '', folder varchar(50) NOT NULL default '', content text, custid varchar(20) NOT NULL default '', read varchar(5) NOT NULL default '', replied varchar(5) NOT NULL default '', row_insert_oprid varchar(50) NOT NULL default '', row_insert_dt datetime NOT NULL default '-00-00 00:00:00', row_update_oprid varchar(50) NOT NULL default '', row_update_dt datetime NOT NULL default '-00-00 00:00:00', PRIMARY KEY (emailid) ) TYPE=MyISAM; ERROR 1064: You have an error in your SQL syntax near 'read varchar(5) NOT NULL default '', replied varchar(5) NOT NULL default '',' at line 7 CREATE TABLE `email` ( `emailid` int(11) NOT NULL auto_increment, `oprid` varchar(50) NOT NULL default '', `folder` varchar(50) NOT NULL default '', `content` text, `custid` varchar(20) NOT NULL default '', `read` varchar(5) NOT NULL default '', `replied` varchar(5) NOT NULL default '', `row_insert_oprid` varchar(50) NOT NULL default '', `row_insert_dt` datetime NOT NULL default '-00-00 00:00:00', `row_update_oprid` varchar(50) NOT NULL default '', `row_update_dt` datetime NOT NULL default '-00-00 00:00:00', PRIMARY KEY (`emailid`) ) TYPE=MyISAM; = __ Do You Yahoo!? Yahoo! - Official partner of 2002 FIFA World Cup http://fifaworldcup.yahoo.com - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
Re: mysql 3.23.50
Hi! http://www.mysql.com/downloads/mysql-3.23-pre.html EG where can i get the 3.23.50 packages with innodb support ? Pierre -- sql,query - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
Re: InnoDB foreign key constraints
Heya! You need an INDEX. Try doing this first : alter table ip_name_tbl add INDEX(name_id); And add then your constraint. EG mysql SHOW CREATE TABLE ip_name_tbl\G *** 1. row *** Table: ip_name_tbl Create Table: CREATE TABLE `ip_name_tbl` ( `id` int(10) unsigned NOT NULL auto_increment, `comp_loc` smallint(5) unsigned NOT NULL default '0', `comp_sub_loc` smallint(5) unsigned NOT NULL default '0', `ip_stat_dyn` enum('DHCP','STATIC') NOT NULL default 'DHCP', `IP` varchar(15) default NULL, `MAC` varchar(17) NOT NULL default '', `network` enum('Hallinto','Asiakas') NOT NULL default 'Hallinto', `name_id` int(11) NOT NULL default '0', `comments` text, PRIMARY KEY (`id`), UNIQUE KEY `name_id` (`name_id`), KEY `ip_idx` (`name_id`) ) TYPE=InnoDB 1 row in set (0.00 sec) Here's what I get: mysql ALTER TABLE ip_name_tbl - ADD CONSTRAINT FOREIGN KEY (name_id) - REFERENCES conn(name_id) - ON DELETE CASCADE; ERROR 1005: Can't create table './koneet/#sql-355_4.frm' (errno: 150) I know error 1005 with an errno 150 means the foreign key would be incorrectly formed, but I can't just figure out what's wrong. I've been reading TFM, and the sentence there must be an index where the foreign key and the referenced key are listed as the first columns seems to have something to do with my problem, I just find the above a bit... well... cryptic. If anyone could lend me a hand, I'd be more than happy. Thank's in advance! Cheers, Markus -- Markus Lervik Linux-administrator Vaasa City Library - Regional Library, Finland [EMAIL PROTECTED] +358-6-325 3589/+358-40-832 6709 - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
Re: Users
Hi! A little effort please http://www.mysql.com/doc/A/d/Adding_users.html and http://www.mysql.com/doc/D/e/Default_privileges.html EG Hi all How do i create users in mysql.. After installing i just start mysql and connect to it.. Whats the default username and password it uses.. -Arul - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
Re: on update problem?
Hi! don't think ON UPDATE is supported. The manual : http://www.innodb.com/ibman.html doesn't mention anything about it except : Starting from version 3.23.50 you can also associate the ON DELETE CASCADE or ON DELETE SET NULL clause with the foreign key constraint. EG When I try to change the id field in the parent table below, I get the error: 1217 - Cannot delete a parent row; a foreign key constraint fails. What have I got wrong? Shouldn't it cascade the changes that were made to the parent down to the child table? This is done with Mysql 3.23.50-max on Windows NT Here is the create that I am using for the test CREATE TABLE parent(id INT unsigned NOT NULL, PRIMARY KEY (id)) TYPE=INNODB; create table child ( id int unsigned not null auto_increment , parent_id int unsigned not null , name varchar(20) null , primary key (id) , index parent_id(parent_id) FOREIGN KEY (parent_id) REFERENCES parent(id) ON UPDATE CASCADE ) TYPE=INNODB; Thanks in advance - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
InnoDB Delete On Cascade
Hello People, I was just designing my database and I was planning to finally use the new feature provided by InnoDB : ON DELETE CASCADE So I tried the example : CREATE TABLE parent(id INT NOT NULL, PRIMARY KEY (id)) TYPE=INNODB; CREATE TABLE child(id INT, parent_id INT, INDEX par_ind (parent_id), FOREIGN KEY (parent_id) REFERENCES parent(id) ON DELETE CASCADE ) TYPE=INNODB; Created two records : insert into parent values(5); insert into child values(0,5); Ok this works all fine. Also geives me errors when I give it a parent ID of an unexisting record, so works like it should. Now isn't the goal of ON DELETE CASCADE is that when the parent record is deleted that the child records that reference the parent record id get deleted aswell? Because this doesn't seem to work. I get : mysql delete from parent where id=5; ERROR 1217: Cannot delete a parent row: a foreign key constraint fails Do I have the wrong idea baout the feature or what might be wrong? Using Version 3.23.50-max-nt and InnoDB. - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
Re: limitation in mysql
Hey, Hi, Is there any limitation about the number of rows in a table and about the number of tables that i can put in mysql? Question has been asked many times. Check the lists. Answer : no, only limited by drive space. EG - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
Re: time
Heya, one solution could be select DATE_FORMAT(date_time, '%T') from testtable; also check out EXTRACT which could help you for your other problem. http://www.mysql.com/doc/D/a/Date_and_time_functions.html EG - Original Message - From: bob nt [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Thursday, April 25, 2002 11:15 AM Subject: time hello, 1) i have a value in a field in the db like 2002-01-02 07:04:19(a date time field) i cannot declare it as a time datatype as i need date also be available in the field. now is the myswl query to get just the time part from the db? 2) Also if i sum up a field which is of time type from a db using the query select sum(t1) from testtable it rerurns some thing like 93050 the values in the table are 07:25:25 02:05:25 it is just adding the hrs min sec but doesn't display the hrs field as 09 also doesn't display as hh:mm:ss format. is there any query in mysql to get these things in the hh:mm:ss format. plz respond me to [EMAIL PROTECTED] tnx bobbie __ Do You Yahoo!? Yahoo! Games - play chess, backgammon, pool and more http://games.yahoo.com/ - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
Re: Mysql.sock missing
Heya! Perhaps because its mysqld.sock ? Check your my.cnf file to see how your configuration is configured (what file and what path the socket file is) [mysqld] socket = /var/run/mysqld/mysqld.sock EG Hello all, I am facing very strange problem I am not having mysql.sock in /var/lib/mysql But it is showing its status to be running. How could it be? Clearance needed. -- Regards, Charitha. - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
Re: New Problem with LAMP
Hi! Check your my.cnf file for the line : socket = path to sock Then change the path to /tmp/mysql.sock or create a symbolic link /tmp/mysql.sock to the path that was inthere. Restart mysql and that should get you going. EG Hi there The database is now running, i've created my tables and put the data inside. This is fine. Next step is to create a PHP-Website which communicates with the database, but i am not able to connect over my apache (this is what it seems to me). to log into the database I use mysql -p dkv (password is ppp user is dcp) anything is ok. my php-script looks like this: ?php $host = localhost; $user = dcp; $pass = ppp; $conex = mysql_connect($host, $user, $pass); if($conex) { echo Connection established.br\n; mysql_close(); } else { echo No Connectionbr; echo mysql_errno() . : . mysql_error . br; } ? If I put this into a file on the server and access it with my browser, I get this error: Warning: Can't connect to local MySQL server through socket '/tmp/mysql.sock' (2) in /eshop/apache/share/htdocs/sql/ connect.php on line 5 Warning: MySQL Connection Failed: Can't connect to local MySQL server through socket '/tmp/mysql.sock' (2) in /eshop/apache/ share/htdocs/sql/connect.php on line 5 No Connection 2002:mysql_error What am I doing wrong? Could it be, that i don't have the necessary modules loaded into my apache? I am new to this, please be kind with me :- Thanks in advance dcp - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
Re: New Problem with LAMP (CORRECTION)
Correction! Look for the line socket in the [mysqld] section! EG Hi! Check your my.cnf file for the line : socket = path to sock Then change the path to /tmp/mysql.sock or create a symbolic link /tmp/mysql.sock to the path that was inthere. Restart mysql and that should get you going. EG - Original Message - From: Dennis Peyerl [EMAIL PROTECTED] To: mysql [EMAIL PROTECTED] Sent: Thursday, March 28, 2002 12:30 PM Subject: New Problem with LAMP Hi there The database is now running, i've created my tables and put the data inside. This is fine. Next step is to create a PHP-Website which communicates with the database, but i am not able to connect over my apache (this is what it seems to me). to log into the database I use mysql -p dkv (password is ppp user is dcp) anything is ok. my php-script looks like this: ?php $host = localhost; $user = dcp; $pass = ppp; $conex = mysql_connect($host, $user, $pass); if($conex) { echo Connection established.br\n; mysql_close(); } else { echo No Connectionbr; echo mysql_errno() . : . mysql_error . br; } ? If I put this into a file on the server and access it with my browser, I get this error: Warning: Can't connect to local MySQL server through socket '/tmp/mysql.sock' (2) in /eshop/apache/share/htdocs/sql/ connect.php on line 5 Warning: MySQL Connection Failed: Can't connect to local MySQL server through socket '/tmp/mysql.sock' (2) in /eshop/apache/ share/htdocs/sql/connect.php on line 5 No Connection 2002:mysql_error What am I doing wrong? Could it be, that i don't have the necessary modules loaded into my apache? I am new to this, please be kind with me :- Thanks in advance dcp - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
Re: New Problem with LAMP (CORRECTION)
Hi! I'm not very used to php but its in php.ini : mysql.default_socket EG - Original Message - From: Dennis Peyerl [EMAIL PROTECTED] To: Me [EMAIL PROTECTED] Cc: mysql [EMAIL PROTECTED] Sent: Thursday, March 28, 2002 1:00 PM Subject: Re: New Problem with LAMP (CORRECTION) Thank you very much it workes now. Could you tell me, how come, that the search-path points to /tmp/mysql.sock? I've just created a link, but isn't it possibly to change the apache of trying to connect to /tmp/mysql.sock? thnax dcp Me wrote: Correction! Look for the line socket in the [mysqld] section! EG Hi! Check your my.cnf file for the line : socket = path to sock Then change the path to /tmp/mysql.sock or create a symbolic link /tmp/mysql.sock to the path that was inthere. Restart mysql and that should get you going. EG - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
Any low budget database access available ???
Hi, I am hoping to find somebody who provides low budget mysql and php access. Thank you very much for any suggestion Andonny - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php