Tracking Forums, Newsgroups, Maling Lists
Home Scripts Tutorials Tracker Forums
  Advanced Search
  HOME    TRACKER    MYSQL


SuperbHosting.net have generously sponsored dedicated servers to ensure a reliable and scalable dedicated hosting solution for BigResource.com.





User Name Null And Socket Default


I installed mysql 4.1.11 in a linux workstation and started it new. I have 2 problems

1. socket defaults to /tmp/mysql.sock. <- How will I change the default socket to another directory where it actually resides.

2. When I enter in mysql, and do something the user name is forgotten and hence I get this error message.
(I tried with both --user option and without it.)

Access denied for user ''@'localhost' to database 'mysql'

When I work as a root user there is no problem.




View Complete Forum Thread with Replies

Related Forum Messages:
When To Use NULL As Default Value
I pretty much set a fields default value to NULL if it not a "required" field in my app.

View Replies !
NULL Default Value
I have a simple table. I'm using phpmyadmin. As you can see my default values for NULL are 0 but for some reason wen a null value is posted to the database it appears as "NULL" instead of "0"....

View Replies !
Binary NOT NULL Default
I've seen this used all over the place, not really sure what binary is used for.

View Replies !
Setting Cols To NULL By Default
For a developer who's making MySQL tables strictly for website content, and who is very confident that his PHP site will unerrorneously integrate with that database: should he make his columns NULL by default or no?Currently the code overlooks empty sets, cells, etc. where necessary; like I said, unerroneous.Right now it's just an issue of being technically correct, if you will. Never cared to set default values.NULL or NOT NULL ?

View Replies !
Error #1064 Near 'COLLATE Latin1_general_ci NOT NULL Default ''
I try to restore my wordpress (it's a php-based blog system) database on my remote webserver running MySQL 4.0.24. When I try to pass this SQL statement:

CREATE TABLE `wp_categories` (
`cat_ID` bigint( 20 ) NOT NULL AUTO_INCREMENT ,
`cat_name` varchar( 55 ) COLLATE latin1_general_ci NOT NULL default '',
`category_nicename` varchar( 200 ) COLLATE latin1_general_ci NOT NULL default '',
`category_description` longtext COLLATE latin1_general_ci NOT NULL ,
`category_parent` int( 4 ) NOT NULL default '0',
PRIMARY KEY ( `cat_ID` ) ,
KEY `category_nicename` ( `category_nicename` )
) ENGINE = MYISAM DEFAULT CHARSET = latin1 COLLATE = latin1_general_ci AUTO_INCREMENT =9

I got this error:

MySQL said:
#1064 - 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 'COLLATE latin1_general_ci NOT NULL default '',
`category_nicen

I tried to replace ` with ' but this didn't work either. My local server is running on MySQL 4.1.15 without problems.

View Replies !
Default Mysql User
I need to know the user name of my "mysql" database so i can connect it to other applications.

So far i haven't created any new profiles, so i'm only prompted to enter the user password when i start up mysql.

Would the default users name in my case be "root" or is that only on unix machines? (i'm running mysql on win2000)


View Replies !
Default Password And User-id For DBA???
what is the default pw and user-id for Mysql log-in ???

View Replies !
Restore Default User Table
For some reason the mysql database does not contain any tables;

How do i restore the default user table?

I tryed to reinstall mysql:

yum remove mysql httpd php php-mysql mysql mysql-server

yum install mysql httpd php php-mysql mysql mysql-server

service mysqld start

[root@localhost] ~ : mysql -u root -p
Enter password:
Welcome to the MySQL monitor. Commands end with ; or g.
Your MySQL connection id is 30 to server version: 4.1.20

Type 'help;' or 'h' for help. Type 'c' to clear the buffer.

mysql> show databases;
+----------+
| Database |
+----------+
| mysql |
| test |
+----------+
2 rows in set (0.00 sec)

mysql> use mysql;
Database changed
mysql> show tables;
ERROR 1044 (42000): Access denied for user 'root'@'localhost' to database 'mysql'
mysql>

But i still dont have permission to create a new database, cause mysql database have no tables.

View Replies !
Default User Error 1045
mysql install is ok,I did not choose a password。so my username is 'root' and my password is 'root',my host address is 'localhost',my Port is '3306',my database is empty,why connection filed? error is access denied for user 'root'@'localhost'(useing password:YES).

View Replies !
MySQL Admin :: Default User Name?
I created an instance using "MySql Server Instance Config Wizard" then opened MySql Administrator, where I was asked to supply a user name and password for the connection. I did not supply a user name creating the Instance. Is there a default user name? How do I login? Windows XP OS

View Replies !
MySQL 4.0.17 Data Scrambles, Not-null Fields Become Null, Etc.
I'm having the most bizarre problem with PHP/MySQL that I've ever
faced and it's an urgent matter (of course) to try to fix it ASAP.

We have one record inserted into a table with 75 columns, whereby half
of the columns are not-null, but for some bizarre reason, the fields
are null. The rest of the columns that are null are completely
scrambled (e.g. "first_name" is in "address2", "fax" is in "url", "url"
is in "last_name", etc.)

This just recently occurred and seems to have no history otherwise. It
occurred sometime on Saturday when the record was inserted but logs
indicate no unusual activity at that time.

Has anyone seen this before and found a way to prevent it from
occurring again?

View Replies !
Incorrect Integer Value: 'NULL' For Column Even If NULL Is Allowed
mysql> desc my_table;
+------------+---------------------+------+-----+---------+-------+
| Field | Type | Null | Key | Default | Extra |
+------------+---------------------+------+-----+---------+-------+
| id | varchar(19) | NO | PRI | | |
| value1 | int(11) | YES | | NULL | |
| value2 | int(11) | YES | | NULL | |
+------------+---------------------+------+-----+---------+-------+

I want to import data from a file that looks like this:
9bcd6f7b47a30fb8_01;NULL;NULL

With following command:
mysql> load data infile 'filename' into table my_table fields terminated by ';';

And get following error:
ERROR 1366 (HY000): Incorrect integer value: 'NULL' for column value1'' at row 1

So the system denies me importing NULL values into a field where NULL is allowed.

View Replies !
Is Null Clause Takes A Lot Of Time But Is Not Null Statement Not
i have a query which takes 1 and half minute to fully execute. This query is following which return 2 records

select o.id, o.number, o.timest, o.receiptno, o.canedit, o.sessionid, o.voidorder, o.cashchange,p.amount from orders o left join payments p on (o.id=p.oid) where p.amount is null

but if i remove the 'not' from where clause then it takes a fraction of seconds. query is following which takes fraction of second and it returns 3920 records

select o.id, o.number, o.timest, o.receiptno, o.canedit, o.sessionid, o.voidorder, o.cashchange,p.amount from orders o left join payments p on (o.id=p.oid) where p.amount is not null

View Replies !
Getting Null Values From A TEXT NOT NULL Field
I have created a table with a field labeled Description which is a TEXT field which does not allow null values. It's defined with

Description TEXT NOT NULL,

However, when empty strings are stored in the Description field, I get NULLs back when querying the database. I'm writing an ASP application which connects to the MySQL database through ADODB. The MySQL version is 5.0.45. The engine is InnoDB.

View Replies !
CREATE TABLE :: Null And Not Null
I recently created a new table in a database and wanted some fields to accept nulls (NULL) and others to not accept nulls (NOT NULL). The table was built correctly, however, when I went to edit a row in the Query Window of MySQL Browser it allowed me to enter in the row when the NOT NULL fields had no values attached to them - this should fail and stop me from entering a row.

Here is the script for the table I created;

CREATE TABLE SLG (
SLG_ID int(11) NOT NULL auto_increment,
SLG_CODE CHAR(1) NOT NULL,
SLG_DESCRIPTION VARCHAR(255) NOT NULL,
SLG_DATE_CREATED DATETIME NOT NULL,
SLG_DATE_MODIFIED DATETIME NOT NULL,
PRIMARY KEY (SLG_ID)
);

When I apply the changes in this window it just enters NULLS into all the other fields. Is this a Query Browser issue. I tried doing the same with an INSERT statement and received the same result.

Also - related to creating a table - is it possible to create global Defaults on a database and then reference those in the DEFAULT statement of the CREATE TABLE command. MS SQL has a system function that can be executed after a table is created to bind a global default to a specific column.

View Replies !
Insert Null To Not Null Column
I have build a replication environment in my environment. the master is MySQL 5.0.24a-standard-log and the slave is 5.1.30-log. the configuration is not the same between them.

I have found a replicaiton error in the slave today says: .....

View Replies !
Can Use Socket But No TCP
I just installed a second instance of mysql that I set to run on port 3307. My problem is a bit strange, I can successfully connect to MySQL on port 3307 from a foreign computer as root, since I set the root user to use '%' as host. My problem is that I cannot connect from the server itself!. I made this php script to test my problem,

PHP

<?php

$link = @mysql_connect('localhost', 'root', '');
if (!$link)
echo('Could not connect with TCP ' . mysql_error());
else
echo 'Connected successfully with TCP'
@mysql_close($link);

$link = @mysql_connect('localhost:/tmp/mysql.sock', 'root', '');
if (!$link)
die('Could not connect with Socket ' . mysql_error());
else
echo 'Connected successfully with Socket'
@mysql_close($link);

?>

This is what the script outputs:
Could not connect with TCP Access denied for user: 'root@localhost' (Using password: NO)
Connected successfully with Socket



View Replies !
Mysql - Socket
how do you make a socket or use unix_socket etc. The basics?

View Replies !
SQL Socket Error
All appears to be working ok except one aspect.
Simple database (indexed 2 table)activity works but on a more sophisticated
existing database accessed through a perl script I get this error (taken
from logs): -

[Tue Apr 27 20:22:52 2004] [error] [client 192.168.0.12] [Tue Apr 27
20:22:52 2004] lbf.cgi: DBI
connect('username_disney:localhost','username_lett uce',...) failed: Can't
connect to local MySQL server through socket '/var/lib/mysql/mysql.sock'
(13) at /home/username/public_html/dating/cgi-bin/scripts/new_database.pl
line 6, referer: http://www.awebsite.loc/

I have checked that the daemon is up and all standard checks recommended
from the mySQL site show the socket is connecting ok and for TCP/IP on port
3306 etc.

View Replies !
Mysql Socket
I have problem with my mySQL databaze (installed via LAMPP) ... some other program (whitch i allready uninstaled) maked some problems on it.

When i am trying to connect do database (PHP) - mySQL return:

,,Can't connect to local MySQL server through socket '/opt/lampp/var/mysql/mysql.sock' (2)"

View Replies !
Socket Problem
My problem is: i installed a mysql server 4.1.9 from a binarie, and then a mysql client. And when i try to connect to the server it returns the following error message: "Cant connect to local MySQL server on socket '/var/run/mysqld/mysqld.sock'". And when i looked for it, there was no mysqld directory in the /var/run directory.

View Replies !
Switch Socket
Actually what I want to do is remove 4.1 because I downloaded 5.0 and installed w/o removing the previous version. I now have port 3307 for 5.0. Is this a problem and how can I change it back to 3306 so e.g. when I use Apache/PHP evrything works?

View Replies !
Unix Socket Vs TCP Mode
Our mysql database always run smoothness, but there have a strange question always happy.
We retrieve content using unix socket mode is always Correct, using TCP mode sometime will meet no return Error. What's wrong with TCP mode?

For example, We need to retrieve content from table Tab_Memo, the condition with ‘large’ is over 20KB, with ‘small’ is about ‘5KB’.

Using unix socket mode:
----------------------------------
mysql -u root -p password
1、select * from Tab_Memo where name = ‘large’; // The result is Correct.
2、select * from Tab_Memo where name = ‘small’; //The result is Correct.

Using unix socket mode
----------------------------------
1、select * from Tab_Memo where name = ‘large’; // NO result return.
2、select * from Tab_Memo where name = ‘small’; //The result is Correct.

View Replies !
MySQL Error: Socket
does anyone know how to fix this error?

Can't connect to local MySQL server through socket '/usr/local/mysql-5.0/data/mysql.sock' (2)

View Replies !
Mysql.so Destroyed Socket
I tried to install one Cms system(.php) on Mandrake Linux(apache 2.0). After using it I found this report: PhpMyadmin cant connect to database. Mysql admin said: "there is wrong socket at /usr/lib/mysql/mysql.so I visited that destination and the file was destroyed(file size=0). I tried to re-install myqsl on server, i tried to re-instal whole Operating system, but it doesnt work. Is there way to solve this?

View Replies !
Socket Error Message
I'm getting an error message I don't understand:

"Could not connect to MySQL: Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (2)"

Can anyone shed any light on this error for me?

View Replies !
#2004 - Can't Create TCP/IP Socket (5)
get this error when trying to open phpmyadmin on IIS 6.0/PHP4
-----------------
MySQL said:

#2004 - Can't create TCP/IP socket (5)

View Replies !
MySQL Socket Error
I get the below error when connecting to mysql database...

Can't connect to local MySQL server through socket
'/var/lib/mysql/mysql.sock' (2)

Why is this? Username/Password are correct.

View Replies !
Connect To Database Without Socket ?
I'm in the process of migrating a website to a new host and found to my horror that all of my database connections stopped working.

This is my old code...

mysql_connect(localhost,$username,$password);
mysql_select_db($database)or die("Unable to select database");
...which I'm accustomed using and it worked just fine on my old host.

But this code on the new host is giving my the following error message...

Warning: mysql_connect() [function.mysql-connect]: Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2)

Unfortunately, you cannot make connection through socket, please use MySQL settings to establish connection. The correct MySQL database settings are:

• DB Host: See your MySQL Database Manager section under DB Host column;
• DB Port: 3306
• DB Name: The database name you have assigned, listed inside Database Manager section of your Control Panel;
• DB Username: The database username you have assigned, listed inside Database Manager section of your Control Panel;
• DB Password: The database password you have assigned;

View Replies !
Connect To Mysql Server Through Socket
I have installed suse 8.2 a short while ago and at my first attempt to connect mysql (via shell and a perl dbi script) i get following error:

can't connect to mysql server through socjet '/var/lib/mysql/mysql.sock'.

i know this looks like a common error and I am terribly sorry if this kind of subject has been posted before but I'll appreciate any urgent help.
ComputerBild 15-03 bestaetigt: Den besten Spam-Schutz gibt es bei
WEB.DE FreeMail - Deutschlands beste E-Mail - http://s.web.de/?mc=021121 .

View Replies !
Can't Connect To Mysql Server Through Socket..
I have installed suse 8.2 a short while ago and at my first attempt to connect mysql (via shell and a perl dbi script) i get following error:

can't connect to mysql server through socket '/var/lib/mysql/mysql.sock'.

View Replies !
MySql Socket Connection Error
I just installed cent os with mysql httpd etc., apache and php are working fine but when i type
root#mysql
I get the following error
Quote: ERROR 2002: Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (111)

View Replies !
Lost Mysql.socket File
My mysql.socket file was accidentally erased and I wondered how I can get it back. Is there a way to create another one?
I'm under mac OSX (leopard) and I already tried to reinstall mysql but I still have no file in /var/mysql.

View Replies !
Wrong Path To Mysqld Socket
Can you please advise which file to check to correct the following error:-

Warning: mysql_connect(): Can't connect to local MySQL server through socket '/tmp/mysql.sock' (2) in /home/astbill/wwwroot/includes/database.mysql.inc on line 31
Can't connect to local MySQL server through socket '/tmp/mysql.sock' (2)

I have checked the my.cnf and it has the correct path

/var/run/mysqld/mysqld.sock

system is Debian
Mysql server is ver 5
apache = 2.054

View Replies !
Trouble Chanigng Mysql 5 Socket Location
How do I change the place where the mysql socket file gets created? I
thought it was in the my.cnf file by changing the "socket" property.
However, using MySQL 5.0 on my Fedora Core 5 Linux system, when I do
this and restart, attempting to connect to MySQL through PHP gives me
this error

Warning: mysql_connect() [function.mysql-connect]: Can't connect to
local MySQL server through socket '/var/lib/mysql/mysql.sock' (2) in
/usr/local/apache2/htdocs/refillingstation/db.php on line 19
Can't connect to MySQL: 'Can't connect to local MySQL server through
socket '/var/lib/mysql/mysql.sock' (2)'

Here is my "my.cnf" file:

[mysqld]
datadir=/var/lib/mysql
socket=/tmp/mysql5.sock
# Default to using old password format for compatibility with mysql 3.x
# clients (those using the mysqlclient10 compatibility package).
old_passwords=1

[mysql.server]
user=mysql
basedir=/var/lib

[mysqld_safe]
log-error=/var/log/mysqld.log
pid-file=/var/run/mysqld/mysqld.pid .

View Replies !
Socket Programming With Stored Procedures/triggers
I'm currently working on a project where we may need publish/subscribe functionality (ie. a client registers an interest in a certain event, and the server will publish an update notice to the client when that event occurs).
One way I was thinking of doing this is to create an AFTER INSERT trigger on the table in question and get it to somehow notify either the middleware (a daemon running on localhost) or the client (a standalone java app running on a remote machine) that a change has occurred. To do this I'd most likely need to write to a socket from within the trigger or stored procedure.

Does anyone know if this is possible? I've had a brief look in the MySQL documentation and nothing seems to jump out at me.

View Replies !
Can't Connect To Local MySQL Server Through Socket
I am running ubuntu 8.10 with mysql server 5.0.67ubuntu6.

When I try to login locally I get the following error:

glen@glen-laptop:~$ mysql -u root -p
Enter password:
ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2)
glen@glen-laptop:~$

It looks like the mysql daemon is not running. When I try to run it I get the following error:

glen@glen-laptop:~$ sudo /etc/init.d/mysql restart
[sudo] password for glen:
* Stopping MySQL database server mysqld [ OK ]
* Starting MySQL database server mysqld [fail]
glen@glen-laptop:~$

I use to have this working fine. But I have somehow managed to break it. I have tried purging mysql and re installing it but I still get the error?

View Replies !
MySQL Server's Socket Is Not Correctly Configured?
After installing Tiger on my mac mini mySQL is all to pot.

Keep getting the message #2002 - The server is not responding (or the local MySQL server's socket is not correctly configured)"

View Replies !
Phpmyadmin :: Cant Connect To Local Mysql Server Through Socket
i have recently installed & config'd mysql all seems to be fine with command line, however i have installed phpmyadmin and keep getting complaints about

'cant connect to local mysql server through socket /..blah/..blah'

i have checked the php.ini file and everything seems to be in order i have been using webmin with no complaints, but would prefer to use phpmyadmin.

View Replies !
Can't Connect To Local MySQL Server Through Socket On Ubuntu
ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2)

when i give mysql databasename it displaying the following error:

Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2)

View Replies !
NULL And NOT NULL Settings
I have a MySQL table that stores name and age of a person. The name field needs to have a value; the age field is optional.I'm quite confused now with the NULL and NOT NULL settings... It seems that neither one does what I want (rejecting an INSERT query where the name field is empty)...So what exactly do I have to do?

View Replies !
VARCHAR Null/Not Null
I'm having a problem with a table that is already created - I want insert attempts to FAIL when the column for 'firstname' is empty (a VARCHAR field). Currently, the column is set to Null=YES and a Default of 'NULL'. This allows records to be inserted with no 'firstname' value (NULL appears in the column). If I change it in phpmyadmin 'structure' to Null=NO and Default of [empty field] then it allows records to be inserted with no 'firstname', and 'firstname' shows empty in the column

View Replies !
PK Field Not Null Is Being Null
I m newbie. I made a MySQL database table and in the primary key field I set the data type VAR CHAR.I also set it not null .BUT still I can insert blank values in this PRIMARY KEY field. If I just blank my primary key field by this query- Insert Tablename Values ('','','','','',''); (if my table has 6 fields).HOW IS IT POSSIBLE. How can PK field allow blank value when I set not null. HOW TO SOLVE IT.

2. I use a MySQL GUI Tools from http://dev.mysql.com/downloads/. In Table viewer of Query browser, each time I insert the first field, it sets the datatype to INTEGER,NOT NULL, AUTO INCREMENT. But I change it to VARCHAR as needed. Do I have to/should use Integer type in PK field and can Varchar be incremented.

3.Can I set user privilege to a particular row (on a particular PK); HOW?

4. Is it correct/incorrect that the name of the foreign key has to be the same as the name of the corresponding PK. I saw that in MySQL I can easily change the FK name to anything else and then just make a reference of FK to the PK.

5. How can I make a one-to-one relationship in MySQL;

View Replies !
Setting Null To Not Null How?
i have a mysql table.. (duh!)

a field in it is set to null and i want to unset it to make it not null.

how do i do that ? by default it takes null values (its weird.. default is null while null column is a no.. so it cant take null values!)

View Replies !
ERROR 2002: Can't Connect To Local MySQL Server Through Socket
i get this when i do '/etc/rc.d/rc.mysql start'

ERROR 2002: Can't connect to local MySQL server through socket '/var/run/mysql/mysql.sock' (2)

ive had a look on google, and the problem for most people seems to be permissions, but im running as root, and the socket doesn't exist. It doesn't create the socket when it runs, because i tried putting mysql in the root user group.

i do have a script that clears the /tmp on login, but i dont think that would affect it,

View Replies !
Linux Mysql Nfs : Bind On Unix Socket: Function Not Implemented
I have installed Mysql on red hat ES release 3 and i was working great.

For my applications, I decided to to put the data directory on another machine. The other machine is a big disk of storage (Adaptec snap server 1 terabyte)
It working great for all applications except Mysql

In fact, i put /var/lib/mysql on another machine and I made a nfs mount

When i try to start mysql i have this :

/etc/rc.d/init.d/mysqld start
Timeout error occurred trying to start MySQL Daemon.
Starting MySQL: [FAILED]

in the error message i have this

051028 11:12:33 mysqld started
051028 11:12:33 Can't start server : Bind on unix socket: Function not implemented
051028 11:12:33 Do you already have another mysqld server running on socket: /var/lib/mysql/mysql.sock ?
051028 11:12:33 Aborting

051028 11:12:33 /usr/libexec/mysqld: Shutdown Complete

051028 11:12:33 mysqld ended

I have verified the permission and everything seems to be ok....

View Replies !
Error 2002: Cant Connect To Local MySQL Server Through Socket
Well that's the error I'm getting when trying to connect to my MySQL database, more specifically:

Error 2002: Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (2)

I know the PHP is fine because it's a straight copy and paste from a site I wrote before that's working fine (on the same host as well no less), anyway I did a bit of Googling and all the results that came up said that it's a configuration issue and can be resolved in several ways (mysql daemon, the my.cnf file etc etc) only problem is I'm on a shared hosting service so I don't have access to this.

Does anyone know of any other potential cause to this problem other than configuration issues or is it just a call up the host deal?

View Replies !
Can't Start Server : Bind On Unix Socket: Permission Denied
I have permission and owner ship for this folder set to user mysql and folder mysql-cluster is 777. Also, I am not running any other mysql server. Any help appreciated.

Here is my error

Quote:

070726 16:10:52 mysqld_safe Starting mysqld daemon with databases from /home/me/mysql/mysql-cluster
/usr/local/mysql/libexec/mysqld: Table 'plugin' is read only
070726 16:10:54 [ERROR] Can't open the mysql.plugin table. Please run mysql_upgrade to create it.
070726 16:11:00 [Warning] NDB: server id set to zero will cause any other mysqld with bin log to log with wrong server id
070726 16:11:00 [Note] Starting MySQL Cluster Binlog Thread
070726 16:11:00 [ERROR] Can't start server : Bind on unix socket: Permission denied
070726 16:11:00 [ERROR] Do you already have another mysqld server running on socket: /home/me/mysql/mysql-cluster/mysql.sock ?
070726 16:11:00 [ERROR] Aborting

070726 16:11:01 [Note] Stopping Cluster Binlog
070726 16:11:01 [Note] Stopping Cluster Utility thread
070726 16:11:05 [Note] /usr/local/mysql/libexec/mysqld: Shutdown complete

View Replies !

Copyright 2005-08 www.BigResource.com, All rights reserved