|
-
mysql 4/5 && TIME_WAIT
Date: 01/18/06
(MySQL Communtiy) Keywords: php, mysql, sql
good evening! has anybody ever seen mysql clients (mysql, php, check_mysql(nagios), etc) choke with an error similar to 'can't assign requested address' ? I've got over 30,000 connections listed in netstat with a status of TIME_WAIT. fairly basic php/mysql site (high traffic), no apparent cause.
possible causes I've thought of:
- maybe somebody initiated a connection but didn't close it.. thrwarted due to the mysql reporting otherwise. - mysql being retarded? not likely, when the error occurs, no incoming connection is reached by the mysql server (via tcpdump/ngrep), resource usage on the server is fine. same with the process list. - max files being reached?
any thoughts? :D
Source: http://community.livejournal.com/mysql/82879.html
-
repair table problems
Date: 01/17/06
(MySQL Communtiy) Keywords: mysql, sql
I have a table that is all messed up so I ran 'repair table my_table'. The problem is that it never completed and didn't give me any error messages. The table is a little bit (a bit over 1 gig), but mysql is using 0.0% of the cpu so it doesn't look like it's doing anything. Does anyone have any ideas to help save my data?
Source: http://community.livejournal.com/mysql/82528.html
-
Trying To Select Some Data
Date: 01/15/06
(MySQL Communtiy) Keywords: php, mysql, sql
i'm trying to select some data from a table. this bit i'm doing quite well with, however it's returning two rows per 'primary key' based on a left join. i've tried using DISTINCT but that doesn't seem to effect it. i then i tried using GROUP BY and that did, so now i'm getting the one row per primary key i was originally after, but i seem to be getting this data without the data of the left join i so desperately need. upon further investigation, back when i was getting two rows per primary key, only the second row per primary key had the data i was after. is their anyway to make sure the query returns the second row as opposed to the first?
my initial idea was to add a clause, but not all rows in the table will have data in that column, i just want to make sure rows with data in that column will definately be returned.
any suggestions?
x-posted to mysql and php_mysql
Source: http://community.livejournal.com/mysql/81895.html
-
Boston MySQL Meetup Group
Date: 01/06/06
(MySQL Communtiy) Keywords: mysql, sql, google
The MySQL Meetup group meeting on Monday, January 9th will focus on backups -- I will give a 30-45 minute presentation on backups and we will then delve into a discussion -- how folks within the group are backing up, how they're not backing up, how they'd like to back up. If there's time, we'll do a "lessons learned from backup horror stories".
Afterwards, we'll head a few doors down to Boston Beer Works for more chatting.
You can see a video of last month's presentation by Philip Antionades of MySQL AB on the new features in MySQL 5.0 at Google Video:
http://video.google.com/videosearch?q=Mysql+5.0+by+Philip+Antoniades
(we will video this month's presentation but not the discussion)
More details, including the event location and directions, are at: http://mysql.meetup.com/137/events/
I encourage you to sign up to receive notification of events, and participate in discussions outside of the meetups. I won't always be posting here.
Any questions, comments, etc should be sent to me. We're currently looking for a space better than North Station -- something around MIT might be nice, and we're trying to get an MIT grad student/faculty/staff member/organization to sponsor it. (We want a location that's good for people driving AND taking the T, and when the Garden has an event, it's not feasible to park there). If you can help out, please let me know.
(You may forward this announcement to other groups, lists, blogs, whatever.)
I'm quite excited about the presentation, as I'm writing down a lot of information from different sources that really wants to be together, but as far as I can tell is not yet, at least not in a public place.
Source: http://community.livejournal.com/mysql/81107.html
-
PHP and MYSQL help
Date: 01/03/06
(MySQL Communtiy) Keywords: mysql, database, sql
While trying to connect to the mysql database, I get this error: Can't connect to local MySQL server through socket '/tmp/mysql.sock' (2) So I look up the solutions for this error. I discover that I need to edit a my.cnf file and change the socket setting. I wish it was that easy. I check what socket is set too.
[client] #password = my_password port = 3306 socket = /opt/local/var/run/mysqld/mysqld.sock
Not the socket the server is trying to connect to.
The file is located in /opt/local/etc/mysql4 and I also copied it to /opt/local/etc incase. The password and username is correct, I can manually connect to the database. Using a Mac OSX.4 server. DB Server version is 4.1.15 Connection: Localhost via UNIX socket
I am out of ideas, can anyone help me?
Source: http://community.livejournal.com/mysql/80709.html
-
Stopwords
Date: 01/01/06
(MySQL Communtiy) Keywords: php, mysql, sql
Ok, new problem.
I have got my fulltext searches to work, but am very much against the idea of stopwords. many of them I want people to be able to search.
Now I have tried setting the path of the file containing them to nothing, but my shell access is having an off day (plus I don’t really want to change thing in there).
Is there a way in the query of letting some of the stopwords pass. I’m using version 4.0.25
Thanks for any help
x posted to php (because they use mysql too)
Source: http://community.livejournal.com/mysql/80433.html
-
Duplicate result rows
Date: 12/28/05
(MySQL Communtiy) Keywords: mysql, database, sql
I am trying to make it so this result can be ordered by the last name of the client. However, the name is in another table thus the JOIN LEFT. That part seems to be working OK (I think), but where I am running into a problem is that the results are showing duplicates (example if invoice 10, there are 3 result rows for invoice 10, but only 1 row in the actual MySQL table "invoice_main").
(Yes, there are some name/case mismatches, but I didnt create the database.)
Thanks!
SELECT DISTINCT invoice_main.invoice_number, invoice_main.invoice_date, invoice_main.due_date, invoice_main.clientid, invoice_main.subtotal, invoice_main.paid_amounts, invoice_main.payment_status, clients.ClientLast FROM $TableName LEFT JOIN clients ON invoice_main.clientid=clients.ClientID WHERE invoice_main.office_id='$office_id' ORDER BY $SortParam LIMIT $limit,$Limit_increment
Adding GROUP BY invoice_main.invoice_number gave me an SQL error
[UPDATE] Figured it out
LEFT JOIN clients ON invoice_main.office_id=clients.office_id AND invoice_main.clientid=clients.ClientID
Gotta thank jedifreeman and his help with JOIN a couple weeks ago. I was re-reading our AIM conversation and thought of this.
Source: http://community.livejournal.com/mysql/80119.html
-
Full text based search SQL
Date: 12/18/05
(MySQL Communtiy) Keywords: cms, php, sql
How do you make your site searches? I am constructing (yet another) CMS of late and am once again at the issue of searching. I am trying to build an SQL statement that will do a full text search of looking in several fields and then ranks each return so they can then be ordered by that before looping them out in php.
How do other people do this? have you found a particular way of doing this that you find works well. My current solution isn’t the most efficient method out there.
Thanks
X-posted to php
Source: http://community.livejournal.com/mysql/78074.html
-
Fulltext index error
Date: 12/16/05
(MySQL Communtiy) Keywords: mysql, sql
This is bound to be something simple I've overlooked (and besides, I'm new at this)...
First, the table. Created from a pre-existing spreadsheet for a community library so please forgive the non-optimum design...
mysql> create table books ( -> book_id mediumint unsigned not null auto_increment, -> author1 varchar(255) not null, -> author2 varchar(255) not null, -> title varchar(255) not null, -> subtitle varchar(255) not null, -> subject1 varchar(255) not null, -> subject2 varchar(255) not null, -> subject3 varchar(255) not null, -> subject4 varchar(255) not null, -> publisher varchar(255) not null, -> year smallint unsigned not null, -> loc varchar(255) not null, -> edition varchar(255) not null, -> isbn varchar(255) not null, -> location varchar(255) not null, -> notes varchar(255) not null, -> PRIMARY KEY (book_id) -> ); Query OK, 0 rows affected (0.01 sec)
Then a data import (load data local infile "/home/lev/Desktop/test.csv" into table books;) - no problem.
Then adding a fairly large fulltext index i.e.,
mysql> alter table books add fulltext index (author1, author2, title, subtitle, subject1, subject2, subject3, subject4, publisher, location);
But a search, any search e.g.,
mysql> select * from books where match (author1,author2) against ('ali'); ERROR 1191 (HY000): Can't find FULLTEXT index matching the column list
help?
Source: http://community.livejournal.com/mysql/77082.html
-
PHP + MySQL 4.1
Date: 01/20/06
(PHP Community) Keywords: php, mysql, database, sql, web, apache
FIXED. Thanks to afromann, cowsandmilk, and nentwined!
I've been looking around since yesterday and just can't seem to find a definitive answer -- how exactly do you use MySQL 4.1.x with PHP 4.x?
Needing some of the functionality available in MySQL 4.1 (and since our host has that as well), I installed it, updated my phpMyAdmin settings, and came across "Client does not support authentication protocol requested by server; consider upgrading MySQL client" message. So I went looking for a fix for that. It told me I had to use the mysqli extension for PHP, but since I installed PHP using the installer (I am on a Windows machine, with Apache), I uninstalled PHP, downloaded the binary zip... but can't find the mysqli extension in the extensions folder in the zip.
So now I am in a quandary. The mysqli extension is not in the binary zip; is it only for PHP5? But the host we're on has MySQL 4.1.x AND PHP 4.x! The manual says something about compiling PHP with support for the mysqli extension -- do I have to recompile PHP4, is that it?
Help, advice, suggestions, etc would be very much appreciated, thanks.
Windows XP Pro Apache 1.3 (I'm using Apache 2.0 on ANOTHER machine) MySQL 4.1.16 PHP... well, none as of the moment, but I was using PHP 4.3.x; I'm trying to install 4.4.2
(Ask if there's anything else needed.)
Update: I thought it would be good to post an update since the update might be significant and people don't always check other comments. :)
Actually, I just got phpMyAdmin working -- not exactly sure what happened there, as the only thing I did was create another mysql user with access to all the databases and use that for phpMyAdmin. I thought my problem was fixed but now I'm trying to log into the webapp I'm working on, to no avail -- the script just plain dies (no warnings, errors, messages, nothing) when I call mysqli_connect( host, user, pw, database) . Echoing before and after that line--
echo 'before call'; $link = mysqli_connect( host, user, pw, database ) or die( 'Error: ' . mysqli_connect_error() ); echo 'after call';
The ONLY output is "before call". NONE of the code after the connect gets run, and obviously the die() didn't work either (or didn't output anything within the parentheses, anyway). Hence I'm a little confused why phpMyAdmin is working (without recompiling php, and without the extension dll either since I can't find it) but my script can't. I'm assuming it's BECAUSE I haven't recompiled PHP, so... yeah.
Fix: I'm not sure why phpMyAdmin can connect using php4 without having to use MySQL's old password hashing algorithm for its user, but it's probably just amazing that way. Used the OLD_PASSWORD() function to change the password for my script's user, and now it's working fine again with the ordinary mysql_* calls. :)
Crossposted: php, webdev, developers
Source: http://community.livejournal.com/php/399323.html
-
...but I'm NOT connecting to SQL Server 2005...
Date: 01/19/06
(SQL Server) Keywords: database, asp, sql, web, microsoft
Okay, here's one for you. Not sure whether I should be posting here or in csharp; figured I'd try here first.
Trying to set up a SqlConnection in C#.NET (2005 Express Edition). When I test the connection, I get the following error:
An error has occurred while establishing a connection to the server. When connecting to SQL Server 2005, this failure may be caused by the fact that under the default settings, SQL Server does not allow remote connections. (provider: SQL Network Interfaces, error: 26 - Error Locating Server/Instance Specified)
All well and good... except the machine to which I'm trying to connect is running SQL Server 2000, not 2005.
There is no connection string as of yet-- it's simply trying to locate the database and access the data (which, I should add, I can do just fine with Enterprise Manager, Query Analyzer, etc.). All I have right now is an "Add Connection" dialog box that has the DSP (Microsoft Sql Server Database File (SqlClient)) and the physical path to the database file (\\edison\c$\Program Files\Microsoft SQL Server\MSSQL\Data\Hospital Rates_Data.MDF). I hit "test connection," and up comes the error.
I am aware of this article at support.microsoft.com. SQL Server 2000 was installed on this machine at least a year before 2005 was released, so that's not the problem (at least, not as they explain it here).Still, I attempted the workaround, and the user they specify does not exist, so I assume that 2005 was never installed on that machine. I've found no help through a websearch; is there no one that doesn't ask questions specifically related to ASP.NET? Sheesh.
If anyone has any ideas, I'd be grateful. Thanks.
Source: http://community.livejournal.com/sqlserver/41154.html
-
UK PHP Programmer Job Ad
Date: 01/23/06
(PHP Community) Keywords: php, programming, css, html, technology, database, sql, java, web, linux, apache
Dear PHP-UG,
I hope this is not too OT. But as far as I’m concerned, a good LAMP programmer worth his salt is also member of various PHP user groups, so while looking for one right now, this seemed very obvious to me.
JOB TITLE & LOCATION: PHP Web Programmer based in Crawley, West Sussex RH10 9GA
COMPANY OVERVIEW: ViewSonic is a leading worldwide provider of advanced display technology, including computer monitors, flat panel displays and projectors for today's business, education, entertainment, Internet and professional markets. The company employs more than 600 people worldwide. More than 400 are based at the company's headquarters in Walnut, California, and more than 100 employees within our 12 offices across Europe. Other affiliate offices can be found in Taiwan, China, Canada, Australia and Latin America.
SUMMARY: This is a recently created position responsible to develop application code and take part in the application design process as member of a team dedicated to develop Web-based business applications which may subsequently be used by employee partners, business partners as well as the general public alike. The applicant must possess a wide range of web-related technical as well as interpersonal and time management skills with a very strong emphasis in experience in the scripting languages and architectures outlined below.
EDUCATION: University degree not required, but any formal education related to web application development considered favourably. Any informal, yet related education will be considered as well.
LANGUAGE: Excellent written and oral command of English. Excellent written and oral command of further languages common in Europe considered a great plus.
EXPERIENCE: Several years developing and designing web-based applications using the languages, architectures, programs and tools listed in the technical skills sub-section.
Technical Skills / Experience: (Essential / Desired) • PHP5 including OOP (E) • HTML & CSS1+2 (able to hand-code) (E) • Usage of PHP programming IDE e.g. Zend Studio (D) • JavaScript / DOM (E) • SQL (E) and basic Database Design (D) • Web Publishing Methodologies (FTP, SCP, CVS etc) (E) • Smarty Templating Engine (D), Ajax libraries (D) • Version Control (CVS, Subversion SourceSafe etc) (D) • Apache Configuration and Administration (D), UTF-8 web setups (D) • Comfortable with Linux BASH / Shell Console (D) • Photoshop (D) • Plaintext Editor with Syntax Highlighting (UltraEdit, Textpad, Vim etc) (E)
SALARY & TYPE Negotiable, based upon experience. 12 months contract.
CONTACT Please send your CVs (cover letter would be nice) to sue.pegrum@viewsoniceurope.com with the subject line "web programmer"
Thanks!
-Armin
Source: http://community.livejournal.com/php/400439.html
-
The phantom truncation.
Date: 01/24/06
(SQL Server) Keywords: sql
I'm hoping someone knows, because I've been looking on the Internet for the past hour and a half. I have seen this question asked many, many times, but I have no yet seen an answer. sorry if I've asked this exact question before. Maybe someone's new here and knows.
I'm getting the following output:
Server: Msg 4863, Level 16, State 1, Line 1 Bulk insert data conversion error (truncation) for row 1, column 10 (underdecis). Server: Msg 4863, Level 16, State 1, Line 1 Bulk insert data conversion error (truncation) for row 2, column 11 (yesno). Server: Msg 4863, Level 16, State 1, Line 1 Bulk insert data conversion error (truncation) for row 3, column 10 (underdecis). Server: Msg 4863, Level 16, State 1, Line 1 Bulk insert data conversion error (truncation) for row 4, column 11 (yesno). Server: Msg 4863, Level 16, State 1, Line 1 Bulk insert data conversion error (truncation) for row 5, column 10 (underdecis). [etc., etc. ad nauseam]
...from the following command:
bulk insert edi.dbo.hdstaging2 from '\\tesla\sql data\load\hd.txt' with ( DATAFILETYPE = 'char')
Here's the data that corresponds to the above error messages:
HD 030 HLT NO PREF FAM
HD 030 HLT NO PREF
HD 030 HLT NO PREF
HD 030 HLT NO PREF EMP
HD 030 HLT NO PREF FAM
Unfortunately, the unprintables are being unprintables; the column separator is chr(9), and there are two chr(9)s at the end of each row (for various reasons far too long to go into here). There are also two chr(9)s between "30" and "HLT", so I can't simply strip out every instance of two chr(9)s sitting close together.
Now, note the (lack of) correlation between the error messages and the data. Just another confusing piece of the puzzle.
I have gathered from today's reading that this is somehow related to the fact that I have fewer actual data items than I do columns in the table into which I'm inserting data. All well and good, I can drop it into a staging table with fewer columns and work from there, with one problem: I have different numbers of populated data columns in different lines.
Does anyone have any idea how to get around this error? "Don't use bulk insert" is the obvious one, but that leads to a whole rash of other questions. If necessary, I'll elucidate those in another post, but got cut off halfway through asking them and had to take an impromptu meeting, and now have no time to finish before leaving work. Salud!
Thanks in advance.
Source: http://community.livejournal.com/sqlserver/41237.html
-
CMS
Date: 01/25/06
(PHP Community) Keywords: cms, php, mysql, asp, sql, web
Following up from my last post, are there any good CMSes out there for a really small site?
I mostly use my personal site as a support resource for online roleplaying games that I run, but I'm tired of needing to upload to the site by FTP whenever I want to change one little thing on a page. At the same time, I like have a visual basis for character sheets and so on... (http://www.patchwolf.com/phoenixcrusade/terpsichore.php for an example). I'd also like to give my players the chance to add stuff directly to the site -- kind of like a wiki.
Of particular concern are the character sheets, where I'd like to still be able to change one detail (like the current form aspect on the example sheet -- currently controlled by an in-page variable), which then affects several other aspects (strength, stamina, health, etc....)
A good mate of mine uses Qwikiwiki (http://www.qwikiwiki.com), which uses a flat-file system -- but if I want to have a hope of maintaining a visual basis on any part of the site, Qwikiwiki's not going to cut it. While I have PHP and MySQL on my web host, I don't actually run the server myself, so that's also something to take into consideration.
Any ideas?
Source: http://community.livejournal.com/php/401978.html
-
If $variable contains....
Date: 01/26/06
(PHP Community) Keywords: mysql, sql, spam
Can someone help me out with a spam protection? How do I make a query like this: if $blahblah CONTAINS (http:// || www. || something) { do something }
So, it's not an exact match, but something that matches anything of the submitted text. It's for a spam protection in a MySQL Guestbook, if that helps...
Thnx! :)
Source: http://community.livejournal.com/php/402335.html
-
Simple Database Display Tool
Date: 01/26/06
(PHP Development) Keywords: php, mysql, software, database, sql, web
I spent a good long time cataloging my huge collection of movies and putting into databases. Now I've got to write some php code to display (and possibly administer) all of this information, which I am not looking forward to. I keep hoping that there's something previously written than I can modify. The concept is simple enough: I need something to display large amounts of tabular data succinctly to end users on my website. I want users to be able to add or remove columns to what they are viewing. They should also be able to sort on any column they wish. All this needs to work seamlessly, as if the user were facing an Excel spreadsheet. Do any of you have suggestions for me on softwares I might try, or have any of you written code to do this already? Thanks in advance for your help.
X-posted to php_mysql
Source: http://community.livejournal.com/php_dev/64170.html
-
What to teach a newbie.
Date: 01/26/06
(SQL Server) Keywords: sql, web
Hey all... I don't really consider myself much of a SQL Server Guru yet. However, my company wants me to start teaching a web developer the basics of SQL Server. I have about an hour with him tomorrow, and am at a bit of a loss on what should be covered. I've already pointed him to a good SQL reference book and was thinking on working him up to various "challenges" where I'll give him a handful of tables, and ask for a query that generates a given output.
That all being said, what specific things do you all think a (relative) newbie of SQL Server *NEEDS* to know?
thanks for your help.
Source: http://community.livejournal.com/sqlserver/41811.html
-
Repeaters in Tables
Date: 01/26/06
(Asp Dot Net) Keywords: html, database, asp, sql, web
Ok... Apparently I'm getting a brain cramp here..
I'm trying to get a repeater to work on an ASP.Net page in a table. For some reason even though I have an example copied DIRECTLY from a website I can't get the damn thing to work properly. I keep getting errors on the HTML side saying like, "Per the active schema, the element 'tr' cannot be nested within 'form'.", and "The active schema does not support the element 'ItemTemplate'.
And when the page is run, I get the error: 'DataItem' is not a member of 'System.Web.UI.Control'.
Here's part of the code. Its not 100% complete because this problem is preventing me from proceeding in testing.
form id="Form1" method="post" runat="server">
asp:Repeater id="parentRepeater" runat="server">
HeaderTemplate> table> tr bgcolor="RosyBrown"> th> %# DataBinder.Eval(Container.DataItem, "infoName") %> /th> /tr> /HeaderTemplate>
ItemTemplate> tr bgcolor="#ffcccc"> td Performance Objectives/td> /tr> tr> td objectives/td> /tr> tr> td Intended Audience/td> /tr> tr> td> <%# DataBinder.Eval(Container.DataItem, "infoIntendAud") %> /td> |