Procedure error handling Best Practice

2018-02-28 Thread Michael Moore
Long time Oracle PL/SQL coder but new to MySQL.

I have an error handler that looks like this ...

declare continue handler for sqlexception
   begin
  get diagnostics condition 1 @p3 = returned_sqlstate, @p4 = message_text;
  set v_there_was_an_error_while_inserting_a_lead_summary := true;

  insert into rit.rit_audit_message(severity,
message,
process_name,

summary_detail_map,
createdby2qmp_user,
updatedby2qmp_user)
   values ('ERROR',
   concat('Something went wrong while trying to insert 
commission lead summaries. No summaries created!  ',
  @p3,
  '  ',
  @p4),
   'pop_comm_summary',

   1003,
   1003);

   end;

So, what if the insert (shown above) throws a sqlexception?

1) What happens?
2) Is there a better way to do this?  Perhaps I should not have DML in my error 
block?


Michael Moore



Re: Optimize fails due to duplicate rows error but no duplicates found

2018-02-23 Thread shawn l.green

(please do not top post - see my answer below)

On 2/13/2018 4:00 PM, Machiel Richards wrote:

ok, so we have managed to get an id out of the errors etc... however
when we look in the table that id does not even exist at all.


no idea what is going on here though.



*From:* shawn l.green <shawn.l.gr...@oracle.com>
*Sent:* 13 February 2018 09:51:33 PM
*To:* mysql@lists.mysql.com
*Subject:* Re: Optimize fails due to duplicate rows error but no
duplicates found
Hello Machiel,

On 2/13/2018 3:02 AM, Machiel Richards wrote:

Good day guys,


 I am hoping this mail finds you well.


I am at a bit of a loss here...


 We are trying to run optimize against a table in order to reclaim disk 
space from archived data which has been removed.


 However, after running for over an hour , the optimize fails stating there 
is a duplicate entry in the table.



  We have now spent 2 days using various methods but we are unable to find 
any duplicates in the primary key and also nothing on the unique key fields.


Any idea on why optimize would still be failing ?



Regards



Is it possible that the duplicate keys were the result of
re-partitioning your data where one of the "older" copies was in the
wrong partition as part of an upgrade from an earlier version?

See the entry in
https://dev.mysql.com/doc/relnotes/mysql/5.5/en/news-5-5-31.html that
start with...

Incompatible Change; Partitioning: Changes in the KEY partitioning hashing 
functions used with numeric, date and time, ENUM, and SET columns in MySQL 5.5 
makes tables using partitioning or subpartitioning by KEY on any of the 
affected column types and created  on a MySQL 5.5 or later server incompatible 
with a MySQL 5.1 server.

This is because the partition IDs as calculated by a MySQL 5.5 or later
server almost certainly differ from those calculated by a MySQL 5.1
server for the same table definition and data as a result of the changes
in these functions.

A normal indexed lookup against a partitioned table will use
(particularly for a PK value) "partition pruning" .  To see all of your
PK values regardless of which partition they are in, you need to scan
the table and avoid all indexes.

example:
# for a numeric PK column
CREATE TABLE myPK_list SELECT pk from sourcetable WHERE pk+0 > 0;

Then you can check the list in the generated table to find any duplicate
values.

Then you can modify a SELECT command to search each partition or
subpartition individually until you find the rows that are in the wrong
spots.
https://dev.mysql.com/doc/refman/5.7/en/partitioning-selection.html


Yours,
--
Shawn Green
MySQL Senior Principal Technical Support Engineer
Oracle USA, Inc. - Integrated Cloud Applications & Platform Services
Office: Blountville, TN

Become certified in MySQL! Visit https://www.mysql.com/certification/
for details.

--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe: http://lists.mysql.com/mysql



Then another thing to consider is that someone (during the lifetime of 
this table) changed the character set of your table (possibly changing 
it from using a case-sensitive collation to a case-insensitive 
collation) without actually converting the data on the table to use the 
new character set.


Is the key being duplicated numeric or character-based?

If numeric, is the value being reported as the duplicate at the high end 
of the permitted range of values for that column?


Regards,

--
Shawn Green
MySQL Senior Principal Technical Support Engineer
Oracle USA, Inc. - Integrated Cloud Applications & Platform Services
Office: Blountville, TN

Become certified in MySQL! Visit https://www.mysql.com/certification/ 
for details.


--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/mysql



Re: Optimize fails due to duplicate rows error but no duplicates found

2018-02-13 Thread Machiel Richards
ok, so we have managed to get an id out of the errors etc... however when we 
look in the table that id does not even exist at all.


no idea what is going on here though.



From: shawn l.green <shawn.l.gr...@oracle.com>
Sent: 13 February 2018 09:51:33 PM
To: mysql@lists.mysql.com
Subject: Re: Optimize fails due to duplicate rows error but no duplicates found

Hello Machiel,

On 2/13/2018 3:02 AM, Machiel Richards wrote:
> Good day guys,
>
>
>  I am hoping this mail finds you well.
>
>
> I am at a bit of a loss here...
>
>
>  We are trying to run optimize against a table in order to reclaim disk 
> space from archived data which has been removed.
>
>
>  However, after running for over an hour , the optimize fails stating 
> there is a duplicate entry in the table.
>
>
>
>   We have now spent 2 days using various methods but we are unable to 
> find any duplicates in the primary key and also nothing on the unique key 
> fields.
>
>
> Any idea on why optimize would still be failing ?
>
>
>
> Regards
>

Is it possible that the duplicate keys were the result of
re-partitioning your data where one of the "older" copies was in the
wrong partition as part of an upgrade from an earlier version?

See the entry in
https://dev.mysql.com/doc/relnotes/mysql/5.5/en/news-5-5-31.html that
start with...
> Incompatible Change; Partitioning: Changes in the KEY partitioning hashing 
> functions used with numeric, date and time, ENUM, and SET columns in MySQL 
> 5.5 makes tables using partitioning or subpartitioning by KEY on any of the 
> affected column types and created on a MySQL 5.5 or later server incompatible 
> with a MySQL 5.1 server. This is because the partition IDs as calculated by a 
> MySQL 5.5 or later server almost certainly differ from those calculated by a 
> MySQL 5.1 server for the same table definition and data as a result of the 
> changes in these functions.

A normal indexed lookup against a partitioned table will use
(particularly for a PK value) "partition pruning" .  To see all of your
PK values regardless of which partition they are in, you need to scan
the table and avoid all indexes.

example:
# for a numeric PK column
CREATE TABLE myPK_list SELECT pk from sourcetable WHERE pk+0 > 0;

Then you can check the list in the generated table to find any duplicate
values.

Then you can modify a SELECT command to search each partition or
subpartition individually until you find the rows that are in the wrong
spots.
https://dev.mysql.com/doc/refman/5.7/en/partitioning-selection.html


Yours,
--
Shawn Green
MySQL Senior Principal Technical Support Engineer
Oracle USA, Inc. - Integrated Cloud Applications & Platform Services
Office: Blountville, TN

Become certified in MySQL! Visit https://www.mysql.com/certification/
for details.

--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/mysql



Re: Optimize fails due to duplicate rows error but no duplicates found

2018-02-13 Thread Machiel Richards
Thank you for the response.


  There are no partitioning involved at all...


  I will try the suggestion though and see if we get anything...


Regards



From: shawn l.green <shawn.l.gr...@oracle.com>
Sent: 13 February 2018 09:51:33 PM
To: mysql@lists.mysql.com
Subject: Re: Optimize fails due to duplicate rows error but no duplicates found

Hello Machiel,

On 2/13/2018 3:02 AM, Machiel Richards wrote:
> Good day guys,
>
>
>  I am hoping this mail finds you well.
>
>
> I am at a bit of a loss here...
>
>
>  We are trying to run optimize against a table in order to reclaim disk 
> space from archived data which has been removed.
>
>
>  However, after running for over an hour , the optimize fails stating 
> there is a duplicate entry in the table.
>
>
>
>   We have now spent 2 days using various methods but we are unable to 
> find any duplicates in the primary key and also nothing on the unique key 
> fields.
>
>
> Any idea on why optimize would still be failing ?
>
>
>
> Regards
>

Is it possible that the duplicate keys were the result of
re-partitioning your data where one of the "older" copies was in the
wrong partition as part of an upgrade from an earlier version?

See the entry in
https://dev.mysql.com/doc/relnotes/mysql/5.5/en/news-5-5-31.html that
start with...
> Incompatible Change; Partitioning: Changes in the KEY partitioning hashing 
> functions used with numeric, date and time, ENUM, and SET columns in MySQL 
> 5.5 makes tables using partitioning or subpartitioning by KEY on any of the 
> affected column types and created on a MySQL 5.5 or later server incompatible 
> with a MySQL 5.1 server. This is because the partition IDs as calculated by a 
> MySQL 5.5 or later server almost certainly differ from those calculated by a 
> MySQL 5.1 server for the same table definition and data as a result of the 
> changes in these functions.

A normal indexed lookup against a partitioned table will use
(particularly for a PK value) "partition pruning" .  To see all of your
PK values regardless of which partition they are in, you need to scan
the table and avoid all indexes.

example:
# for a numeric PK column
CREATE TABLE myPK_list SELECT pk from sourcetable WHERE pk+0 > 0;

Then you can check the list in the generated table to find any duplicate
values.

Then you can modify a SELECT command to search each partition or
subpartition individually until you find the rows that are in the wrong
spots.
https://dev.mysql.com/doc/refman/5.7/en/partitioning-selection.html


Yours,
--
Shawn Green
MySQL Senior Principal Technical Support Engineer
Oracle USA, Inc. - Integrated Cloud Applications & Platform Services
Office: Blountville, TN

Become certified in MySQL! Visit https://www.mysql.com/certification/
for details.

--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/mysql



Re: Optimize fails due to duplicate rows error but no duplicates found

2018-02-13 Thread shawn l.green

Hello Machiel,

On 2/13/2018 3:02 AM, Machiel Richards wrote:

Good day guys,


 I am hoping this mail finds you well.


I am at a bit of a loss here...


 We are trying to run optimize against a table in order to reclaim disk 
space from archived data which has been removed.


 However, after running for over an hour , the optimize fails stating there 
is a duplicate entry in the table.



  We have now spent 2 days using various methods but we are unable to find 
any duplicates in the primary key and also nothing on the unique key fields.


Any idea on why optimize would still be failing ?



Regards



Is it possible that the duplicate keys were the result of 
re-partitioning your data where one of the "older" copies was in the 
wrong partition as part of an upgrade from an earlier version?


See the entry in 
https://dev.mysql.com/doc/relnotes/mysql/5.5/en/news-5-5-31.html that 
start with...

Incompatible Change; Partitioning: Changes in the KEY partitioning hashing 
functions used with numeric, date and time, ENUM, and SET columns in MySQL 5.5 
makes tables using partitioning or subpartitioning by KEY on any of the 
affected column types and created on a MySQL 5.5 or later server incompatible 
with a MySQL 5.1 server. This is because the partition IDs as calculated by a 
MySQL 5.5 or later server almost certainly differ from those calculated by a 
MySQL 5.1 server for the same table definition and data as a result of the 
changes in these functions.


A normal indexed lookup against a partitioned table will use 
(particularly for a PK value) "partition pruning" .  To see all of your 
PK values regardless of which partition they are in, you need to scan 
the table and avoid all indexes.


example:
# for a numeric PK column
CREATE TABLE myPK_list SELECT pk from sourcetable WHERE pk+0 > 0;

Then you can check the list in the generated table to find any duplicate 
values.


Then you can modify a SELECT command to search each partition or 
subpartition individually until you find the rows that are in the wrong 
spots.

https://dev.mysql.com/doc/refman/5.7/en/partitioning-selection.html


Yours,
--
Shawn Green
MySQL Senior Principal Technical Support Engineer
Oracle USA, Inc. - Integrated Cloud Applications & Platform Services
Office: Blountville, TN

Become certified in MySQL! Visit https://www.mysql.com/certification/ 
for details.


--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/mysql



Optimize fails due to duplicate rows error but no duplicates found

2018-02-13 Thread Machiel Richards
Good day guys,


I am hoping this mail finds you well.


   I am at a bit of a loss here...


We are trying to run optimize against a table in order to reclaim disk 
space from archived data which has been removed.


However, after running for over an hour , the optimize fails stating there 
is a duplicate entry in the table.



 We have now spent 2 days using various methods but we are unable to find 
any duplicates in the primary key and also nothing on the unique key fields.


Any idea on why optimize would still be failing ?



Regards


Error 1837

2017-05-04 Thread Ruben Cardenal
Hi, 

On a fresh new master-slave very simple setup with just a Magento 1.5 DB
under MySQL 5.6.35, I'm getting this error with a memory table: 

2017-05-03 07:08:37 1109 [Note] Slave I/O thread: connected to master
'replica@10.0.15.183:3306',replication started in log 'FIRST' at
position 4
2017-05-03 11:38:18 1109 [ERROR] Slave SQL: Error 'When
@@SESSION.GTID_NEXT is set to a GTID, you must explicitly set it to a
different value after a COMMIT or ROLLBACK. Please check GTID_NEXT
variable manual page for detailed explanation. Current
@@SESSION.GTID_NEXT is '76a1eb3e-1ecc-11e7-a106-027ba847acd7:121'.' on
query. Default database: 'x_web'. Query: 'DELETE FROM
`x_web`.`catalog_product_index_price_bundle_tmp`', Error_code: 1837
2017-05-03 11:38:18 1109 [Warning] Slave: When @@SESSION.GTID_NEXT is
set to a GTID, you must explicitly set it to a different value after a
COMMIT or ROLLBACK. Please check GTID_NEXT variable manual page for
detailed explanation. Current @@SESSION.GTID_NEXT is
'76a1eb3e-1ecc-11e7-a106-027ba847acd7:121'. Error_code: 1837
2017-05-03 11:38:18 1109 [ERROR] Error running query, slave SQL thread
aborted. Fix the problem, and restart the slave SQL thread with "SLAVE
START". We stopped at log 'x-pre-master-mysql-bin.01' position
68789 

and replication stops util I stop/start slave. 

That looks it was fixed in https://bugs.mysql.com/bug.php?id=68525 but
it's happening to me at least. 

Any help? 

Thanks, 

Rubén.

Re: Mystery error in GRANT statement

2016-10-04 Thread Richard

> Date: Monday, October 03, 2016 23:18:14 -0700
> From: James Moe 
>
> On 10/03/2016 08:16 PM, Richard wrote:
>> If you want/need to use it I believe you need to use the
>> "backtick" to quote the name
>> 
>   Yes, that worked. Thank you.
>   Is there an easy way to rename a database?


See the documentation for the syntax:

  

  

-- 
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/mysql



Re: Mystery error in GRANT statement

2016-10-04 Thread James Moe
On 10/03/2016 08:16 PM, Richard wrote:
> If
> you want/need to use it I believe you need to use the "backtick" to
> quote the name
>
  Yes, that worked. Thank you.
  Is there an easy way to rename a database?

-- 
James Moe
moe dot james at sohnen-moe dot com
520.743.3936
Think.



signature.asc
Description: OpenPGP digital signature


Re: Mystery error in GRANT statement

2016-10-03 Thread Richard


> Date: Monday, October 03, 2016 18:39:22 -0700
> From: James Moe <ji...@sohnen-moe.com>
>
> opensuse v42.1
> linux 4.1.31-30-default x86_64
> 10.0.26-MariaDB
> 
> I have a database named "sma-v4-01". The GRANT statement does not
> like that database name:
> 
> MariaDB [sma-v4-01]> GRANT ALL ON 'sma-v4-01'.* TO
> ''@'sma-station14l' IDENTIFIED BY 'xx';
> 
> ERROR 1064 (42000): You have an error in your SQL syntax; check the
> manual that corresponds to your MariaDB server version for the right
> syntax to use near ''sma-v4-01'.* TO 'x'@'sma-station14l'
> IDENTIFIED BY 'xx'' at line 1
> 
> If I replace 'sma-v4-01' with 'sma_joomla', the statement is
> accepted.
> 
> What is wrong with 'sma-v4-01'?


The "dash" (-) isn't really a permissible table name character. If
you want/need to use it I believe you need to use the "backtick" to
quote the name [unless you set "ansi_quotes" in which case you can
use the double quote character].



-- 
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/mysql



Re: Mystery error in GRANT statement

2016-10-03 Thread Michael Munger
Nothing. But you opened your quote 27th a " and tried to close it with a '

Quote mismatch.

Get Outlook for Android<https://aka.ms/ghei36>



On Mon, Oct 3, 2016 at 9:45 PM -0400, "James Moe" 
<ji...@sohnen-moe.com<mailto:ji...@sohnen-moe.com>> wrote:

opensuse v42.1
linux 4.1.31-30-default x86_64
10.0.26-MariaDB

I have a database named "sma-v4-01". The GRANT statement does not like
that database name:

MariaDB [sma-v4-01]> GRANT ALL ON 'sma-v4-01'.* TO
''@'sma-station14l' IDENTIFIED BY 'xx';

ERROR 1064 (42000): You have an error in your SQL syntax; check the
manual that corresponds to your MariaDB server version for the right
syntax to use near ''sma-v4-01'.* TO 'x'@'sma-station14l'
IDENTIFIED BY 'xx'' at line 1

If I replace 'sma-v4-01' with 'sma_joomla', the statement is accepted.

What is wrong with 'sma-v4-01'?

--
James Moe
moe dot james at sohnen-moe dot com
520.743.3936
Think.



Mystery error in GRANT statement

2016-10-03 Thread James Moe
opensuse v42.1
linux 4.1.31-30-default x86_64
10.0.26-MariaDB

I have a database named "sma-v4-01". The GRANT statement does not like
that database name:

MariaDB [sma-v4-01]> GRANT ALL ON 'sma-v4-01'.* TO
''@'sma-station14l' IDENTIFIED BY 'xx';

ERROR 1064 (42000): You have an error in your SQL syntax; check the
manual that corresponds to your MariaDB server version for the right
syntax to use near ''sma-v4-01'.* TO 'x'@'sma-station14l'
IDENTIFIED BY 'xx'' at line 1

If I replace 'sma-v4-01' with 'sma_joomla', the statement is accepted.

What is wrong with 'sma-v4-01'?

-- 
James Moe
moe dot james at sohnen-moe dot com
520.743.3936
Think.





signature.asc
Description: OpenPGP digital signature


Mystery error in GRANT statement

2016-10-03 Thread James Moe
opensuse v42.1
linux 4.1.31-30-default x86_64
10.0.26-MariaDB

I have a database named "sma-v4-01". The GRANT statement does not like
that database name:

MariaDB [sma-v4-01]> GRANT ALL ON 'sma-v4-01'.* TO
''@'sma-station14l' IDENTIFIED BY 'xx';

ERROR 1064 (42000): You have an error in your SQL syntax; check the
manual that corresponds to your MariaDB server version for the right
syntax to use near ''sma-v4-01'.* TO 'x'@'sma-station14l'
IDENTIFIED BY 'xx'' at line 1

If I replace 'sma-v4-01' with 'sma_joomla', the statement is accepted.

What is wrong with 'sma-v4-01'?

-- 
James Moe
moe dot james at sohnen-moe dot com
520.743.3936
Think.



signature.asc
Description: OpenPGP digital signature


... ERROR! The server quit without updating PID file

2016-07-04 Thread Martin Mueller
I ran into the problem referred to in the subject line. It seems to be fairly 
common, to judge from stuff on the Internet, but none of the explanations or 
solutions offered there were of any help to me.

I run MySql 5.22 on a Mac desktop with El Capitan, but the MySQL installation 
is inherited from an earlier version of OS X. I stopped the server from the 
MySQL icon in the System Preferences panel,  because I wanted to perform a 
proper binary backup and Dubois’ book said to stop the server especially if you 
are using INNO tables. When I restarted it with the restart seemed to work for 
a while but then aborted  with the message “... ERROR! The server quit without 
updating PID file”

As I understand it, the start and stop operations for MySQL server on the Mac 
changed between Yosemite and El Capitan. So it seems plausible to me that the 
server shut down according to one protocol and the way in which it shut down 
prevents it now from starting. I turned the computer on and off many times and 
the MySQL always automatically restarted, but I don’t remember ever stopping it 
from the MySQL icon in the Mac’s System preferences, and I suspect that using 
it was the cause of the malfunction.

What can I do? One voice on the Internet suggested simply replacing the 
installation altogether, keeping the data directory and then updating the new 
data directory with the old one. If I read Paul Dubois’ MySQL manual correctly 
that should be OK. Because I made what he calls a “binary backup” and all my 
files are MyISAM or InnoDb and should be machine or version independent.

I hesitate because on a previous occasion an older version of MySQL was 
extraordinarily difficult to get rid of and the machine in later installations 
seemed to remember a password that I had forgotten. In this case, I know the 
passwords.

So, is the best thing to do


1)   Move the data directory out of the current instllation

2)   Get rid of the current installation

3)   Replace the data directory of the new instllation with the old data 
directory

Or are  there problems and unknown dependencies in that approach?

Martin Mueller
Professor emeritus of English and Classics
Northwestern University


Re: Workbench MySQL Enterprise Backup Error

2016-03-22 Thread Andrew Moore
The beauty of running enterprise versions is that you have support from
Oracle. I would gently point you in their direction if not to get what you
paid for but also because most of us in this list are unequipped to help
you because we don't use the software you have problems with.

Good luck
On 22 Mar 2016 8:15 pm, "Lisa Smith"  wrote:

> Hello all,
>
> I have not run across this problem where Workbench will not let me access
> the "Online Backup"
> link and claims that my version of MySQL Enterprise Backup is 0.0.0 (it is
> 4.0.0).
>
> I had backups running and scheduled through Workbench previously. Yesterday
> I changed my data files to another drive and when I restarted Workbench I
> was no longer able to access Online Backup.
>
> I feel like I may be missing something obvious so any suggestions would be
> greatly appreciated.
>
> I am running MySQL Enterprise 5.7 on Windows Server 2012.
>
> Thank you for reading.
>


Workbench MySQL Enterprise Backup Error

2016-03-22 Thread Lisa Smith
Hello all,

I have not run across this problem where Workbench will not let me access
the "Online Backup"
link and claims that my version of MySQL Enterprise Backup is 0.0.0 (it is
4.0.0).

I had backups running and scheduled through Workbench previously. Yesterday
I changed my data files to another drive and when I restarted Workbench I
was no longer able to access Online Backup.

I feel like I may be missing something obvious so any suggestions would be
greatly appreciated.

I am running MySQL Enterprise 5.7 on Windows Server 2012.

Thank you for reading.


Re: Renaming a table that has a trigger, then attempting to drop that trigger results in 'table doesn't exist' error.

2016-01-18 Thread shawn l.green

Hello Michael,

On 1/6/2016 12:51 PM, Michael Vaughan wrote:

If you execute the script below, you will get the following error:
'Error Code: 1146. Table 'testschema.TestRenamed' doesn't exist"

delimiter //

CREATE TABLE Test(
   id  int not null primary key auto_increment,
   name varchar(255)
)//

CREATE TRIGGER TEST_TRIGGER
BEFORE INSERT ON Test
FOR EACH ROW
BEGIN
SET NEW.name = CONCAT(NEW.name, '_X');
END//

RENAME TABLE Test TO TestRenamed//

DROP TRIGGER Test.TEST_TRIGGER//



Are there any workarounds for this?



Thank you for also reporting this as a bug.

http://bugs.mysql.com/bug.php?id=79873

--
Shawn Green
MySQL Senior Principal Technical Support Engineer
Oracle USA, Inc. - Integrated Cloud Applications & Platform Services
Office: Blountville, TN

Become certified in MySQL! Visit https://www.mysql.com/certification/ 
for details.


--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/mysql



Renaming a table that has a trigger, then attempting to drop that trigger results in 'table doesn't exist' error.

2016-01-06 Thread Michael Vaughan
If you execute the script below, you will get the following error: 
'Error Code: 1146. Table 'testschema.TestRenamed' doesn't exist"

delimiter //

CREATE TABLE Test(
  id  int not null primary key auto_increment,
  name varchar(255)
)//

CREATE TRIGGER TEST_TRIGGER
BEFORE INSERT ON Test
FOR EACH ROW
BEGIN
   SET NEW.name = CONCAT(NEW.name, '_X');
END//

RENAME TABLE Test TO TestRenamed//

DROP TRIGGER Test.TEST_TRIGGER//



Are there any workarounds for this?

-- 
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/mysql



MySQL error to syslog

2015-01-08 Thread Olivier Nicole
HI,

I am running MySQL 5.5.31 on FreeBSD 9.2. I have a web server with a
miss-configured service that generates faulty connections. After a
while, MySQl blocks any connection from the web server.

At some stage, I had set-up a script that would browse syslog log and
look for a string like Host 'xxx' is blocked because of many connection
errors; unblock with 'mysqladmin flush-hosts' and would then issue a
mysqladmin flush-hosts.

But after an upgrade, MySQl stopped reporting to syslog.

MySQL process is:

databaseroot: ps auwwx | grep mysql
mysql 81063   0.0  0.1   9852  1172 ??  Is3Dec14  0:00.18 /bin/sh 
/usr/local/bin/mysqld_safe --defaults-extra-file=/database/mysql/my.cnf 
--user=mysql --datadir=/database/mysql 
--pid-file=/database/mysql/database.cs.ait.ac.th.pid --syslog
mysql 81386   0.0  2.0 314712 42180 ??  I 3Dec14  8:19.75
/usr/local/libexec/mysqld --defaults-extra-file=/database/mysql/my.cnf
--basedir=/usr/local --datadir=/database/mysql
--plugin-dir=/usr/local/lib/mysql/plugin --user=mysql
--pid-file=/database/mysql/database.cs.ait.ac.th.pid
--socket=/tmp/mysql.sock --port=3306

Any help will be greatly appreciated.

TIA,

Olivier

-- 

-- 
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/mysql



Re: INTO OUTFILE ERROR...

2014-09-22 Thread william drescher

On 9/19/2014 10:59 AM, Don Wieland wrote:

On Sep 19, 2014, at 7:50 AM, Reindl Harald wrote:


the target folder don't matter
that is clearly a *MySQL error* that your *MYSQL user* lack the needed 
permissions


Yes i figured that - so the question is, how do I give full permissions to that 
user?

I did go to my cPanel and delete the user and recreated the user adding them to 
the DB with ALL PRIVILEGES. Obviously this is not enough.

If this is not a simple thing that I can do myself, I am willing to compensate 
someone for support they can offer via GoToMeeting and SKYPE.

I am spinning my wheels and I need to resolve this issue asap.



Please note:  cpanel can create linux users.  You need to create 
and manage the MySQL users.  There is no relationship between the 
linux users and the MySQL users.


-bill



--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/mysql



Re: INTO OUTFILE ERROR...

2014-09-22 Thread Reindl Harald

Am 22.09.2014 um 12:44 schrieb william drescher:
 On 9/19/2014 10:59 AM, Don Wieland wrote:
 On Sep 19, 2014, at 7:50 AM, Reindl Harald wrote:

 the target folder don't matter
 that is clearly a *MySQL error* that your *MYSQL user* lack the needed 
 permissions

 Yes i figured that - so the question is, how do I give full permissions to 
 that user?

 I did go to my cPanel and delete the user and recreated the user adding them 
 to the DB with ALL PRIVILEGES.
 Obviously this is not enough.

 If this is not a simple thing that I can do myself, I am willing to 
 compensate someone for support they can offer
 via GoToMeeting and SKYPE.

 I am spinning my wheels and I need to resolve this issue asap.

 
 Please note:  cpanel can create linux users.  You need to create and 
 manage the MySQL users.  There is no relationship between the linux 
 users and the MySQL users

irreleveant, he just don't realize that file permissions are *not*
in the scope of adding them to the DB with ALL PRIVILEGES

why in the world did i post the link to the answer
last friday if people are too lazy to read

GRANT FILE ON *.* TO 'asdfsdf'@'localhost';
is a global setting because you access *the hosts FILESYSTEM* with it

http://lmgtfy.com/?q=mysql+permissions+into+outfile
http://stackoverflow.com/questions/6091427/mysql-into-outfile-access-denied-but-my-user-has-all-access-and-the-fold




signature.asc
Description: OpenPGP digital signature


Re: INTO OUTFILE ERROR...

2014-09-21 Thread Divesh Kamra
Check permission of user 'teal1dwd_teal' 

DK Sent from Phone

 On 19-Sep-2014, at 8:13 pm, Don Wieland d...@pointmade.net wrote:
 
 Hi gang,
 
 Trying to generate a CSV file using mySQL and I keep getting this error 
 below. The target folder has full permissions to write (777). I am not 
 certain why this is happening. Any answers? Thanks!
 
 
 Database_Class error: DATABASE_ERROR: Access denied for user 
 'teal1dwd_teal'@'localhost' (using password: YES) IN [SELECT u.user_id, 
 u.first_name AS u_first_name, 
 u.last_name AS u_last_name,
 c.client_id AS c_client_id,
 c.first_name AS c_first_name,
 c.middle_name AS c_middle_name,
 c.last_name AS c_last_name,
 c.address AS c_address,
 c.city AS c_city,
 c.state AS c_state,
 c.zip AS c_zip,
 c.dob AS dob_ymd,
 c.phone_home AS c_phone_home,
 c.phone_cell AS c_phone_cell,
 c.phone_work AS c_phone_work,
 c.email AS c_email,
 c.other_contacts AS c_other_contacts,
 count(*) as apt_qty
 
 FROM tl_appt apt 
 
 JOIN tl_clients c on c.client_id = apt.client_id 
 JOIN tl_rooms r on r.room_id = apt.room_id
 JOIN tl_users u on u.user_id = apt.user_id
 
 WHERE 
 
 apt.time_start between '1388552400' and '1420088399' 
 and r.location_id = '1'
 
 GROUP BY u.user_id, c.client_id 
 having count(*)  1
 
 ORDER BY u.first_name, u.last_name, c.last_name, c.first_name
 INTO OUTFILE '/tmp/1_2031305738.csv' 
 FIELDS TERMINATED BY ','
 ENCLOSED BY '']
 
 
 Don Wieland
 d...@pointmade.net
 http://www.pointmade.net
 https://www.facebook.com/pointmade.band
 
 
 
 

--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/mysql



INTO OUTFILE ERROR...

2014-09-19 Thread Don Wieland
Hi gang,

Trying to generate a CSV file using mySQL and I keep getting this error below. 
The target folder has full permissions to write (777). I am not certain why 
this is happening. Any answers? Thanks!


Database_Class error: DATABASE_ERROR: Access denied for user 
'teal1dwd_teal'@'localhost' (using password: YES) IN [SELECT u.user_id, 
u.first_name AS u_first_name, 
u.last_name AS u_last_name,
c.client_id AS c_client_id,
c.first_name AS c_first_name,
c.middle_name AS c_middle_name,
c.last_name AS c_last_name,
c.address AS c_address,
c.city AS c_city,
c.state AS c_state,
c.zip AS c_zip,
c.dob AS dob_ymd,
c.phone_home AS c_phone_home,
c.phone_cell AS c_phone_cell,
c.phone_work AS c_phone_work,
c.email AS c_email,
c.other_contacts AS c_other_contacts,
count(*) as apt_qty

FROM tl_appt apt 

JOIN tl_clients c on c.client_id = apt.client_id 
JOIN tl_rooms r on r.room_id = apt.room_id
JOIN tl_users u on u.user_id = apt.user_id

WHERE 

apt.time_start between '1388552400' and '1420088399' 
and r.location_id = '1'

GROUP BY u.user_id, c.client_id 
having count(*)  1

ORDER BY u.first_name, u.last_name, c.last_name, c.first_name
INTO OUTFILE '/tmp/1_2031305738.csv' 
FIELDS TERMINATED BY ','
ENCLOSED BY '']


Don Wieland
d...@pointmade.net
http://www.pointmade.net
https://www.facebook.com/pointmade.band






Re: INTO OUTFILE ERROR...

2014-09-19 Thread Reindl Harald


Am 19.09.2014 um 16:43 schrieb Don Wieland:
 Trying to generate a CSV file using mySQL and I keep getting this error 
 below. The target folder has full permissions to write (777). I am not 
 certain why this is happening. Any answers? Thanks!

the target folder don't matter
that is clearly a *MySQL error* that your *MYSQL user* lack the needed 
permissions

 Database_Class error: DATABASE_ERROR: Access denied for user 
 'teal1dwd_teal'@'localhost' (using password: YES) IN [SELECT u.user_id, 
 u.first_name AS u_first_name, 
 u.last_name AS u_last_name,
 c.client_id AS c_client_id,
 c.first_name AS c_first_name,
 c.middle_name AS c_middle_name,
 c.last_name AS c_last_name,
 c.address AS c_address,
 c.city AS c_city,
 c.state AS c_state,
 c.zip AS c_zip,
 c.dob AS dob_ymd,
 c.phone_home AS c_phone_home,
 c.phone_cell AS c_phone_cell,
 c.phone_work AS c_phone_work,
 c.email AS c_email,
 c.other_contacts AS c_other_contacts,
 count(*) as apt_qty
 
 FROM tl_appt apt 
 
 JOIN tl_clients c on c.client_id = apt.client_id 
 JOIN tl_rooms r on r.room_id = apt.room_id
 JOIN tl_users u on u.user_id = apt.user_id
 
 WHERE 
 
 apt.time_start between '1388552400' and '1420088399' 
 and r.location_id = '1'
 
 GROUP BY u.user_id, c.client_id 
 having count(*)  1
 
 ORDER BY u.first_name, u.last_name, c.last_name, c.first_name
 INTO OUTFILE '/tmp/1_2031305738.csv' 
 FIELDS TERMINATED BY ','
 ENCLOSED BY '']



signature.asc
Description: OpenPGP digital signature


Re: INTO OUTFILE ERROR...

2014-09-19 Thread Don Wieland
On Sep 19, 2014, at 7:50 AM, Reindl Harald wrote:

 the target folder don't matter
 that is clearly a *MySQL error* that your *MYSQL user* lack the needed 
 permissions

Yes i figured that - so the question is, how do I give full permissions to that 
user?

I did go to my cPanel and delete the user and recreated the user adding them to 
the DB with ALL PRIVILEGES. Obviously this is not enough.

If this is not a simple thing that I can do myself, I am willing to compensate 
someone for support they can offer via GoToMeeting and SKYPE.

I am spinning my wheels and I need to resolve this issue asap.

Don Wieland
d...@pointmade.net
http://www.pointmade.net
https://www.facebook.com/pointmade.band






Re: INTO OUTFILE ERROR...

2014-09-19 Thread Reindl Harald

Am 19.09.2014 um 16:59 schrieb Don Wieland:
 On Sep 19, 2014, at 7:50 AM, Reindl Harald wrote:
 
 the target folder don't matter
 that is clearly a *MySQL error* that your *MYSQL user* lack the needed 
 permissions
 
 Yes i figured that - so the question is, how do I give full permissions to 
 that user?
 
 I did go to my cPanel and delete the user and recreated the user adding them 
 to the DB with ALL PRIVILEGES.
 Obviously this is not enough.

into outfile is *not* a db-specific permission

http://lmgtfy.com/?q=mysql+permissions+into+outfile
http://stackoverflow.com/questions/6091427/mysql-into-outfile-access-denied-but-my-user-has-all-access-and-the-fold



signature.asc
Description: OpenPGP digital signature


Re: INTO OUTFILE ERROR...

2014-09-19 Thread Don Wieland
Thanks Reindl,

Yes I stubbled upon this page last night. I try running that query:

grant all privileges 
  on teal1dwd_teal.* 
  to 'teal1dwd_teal'@'localhost' 
  identified by 'my_user_pw';

I get this error:

#1044 - Access denied for user 'teal1dwd'@'localhost' to database 
'teal1dwd_teal'

Do I need to perform this query in a different place?  Sigh…

Don

On Sep 19, 2014, at 8:03 AM, Reindl Harald wrote:

 into outfile is *not* a db-specific permission
 
 http://lmgtfy.com/?q=mysql+permissions+into+outfile
 http://stackoverflow.com/questions/6091427/mysql-into-outfile-access-denied-but-my-user-has-all-access-and-the-fold

Don Wieland
d...@pointmade.net
http://www.pointmade.net
https://www.facebook.com/pointmade.band






Re: INTO OUTFILE ERROR...

2014-09-19 Thread Christophe

Hi there,

Le 19/09/2014 17:19, Don Wieland a écrit :


grant all privileges
   on teal1dwd_teal.*
   to 'teal1dwd_teal'@'localhost'
   identified by 'my_user_pw';

I get this error:

#1044 - Access denied for user 'teal1dwd'@'localhost' to database 
'teal1dwd_teal'



I think you are trying to access the DB with the 'teal1dwd' user, but 
your grant applies to 'teal1dwd_teal'.


Hope this helps ;).

Regards,
Christophe.


--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/mysql



Re: INTO OUTFILE ERROR...

2014-09-19 Thread Christophe

Le 19/09/2014 18:00, Christophe a écrit :

Hi there,

Le 19/09/2014 17:19, Don Wieland a écrit :


grant all privileges
   on teal1dwd_teal.*
   to 'teal1dwd_teal'@'localhost'
   identified by 'my_user_pw';

I get this error:

#1044 - Access denied for user 'teal1dwd'@'localhost' to database
'teal1dwd_teal'



I think you are trying to access the DB with the 'teal1dwd' user, but
your grant applies to 'teal1dwd_teal'.



I forgot to tell, that GRANT queries need to be performed by a user 
which has the GRANT privilege.


Don't you have root access to MySQL instance ?



--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/mysql



Re: INTO OUTFILE ERROR...

2014-09-19 Thread Don Wieland
On Sep 19, 2014, at 9:11 AM, Christophe wrote:

 Don't you have root access to MySQL instance ?

I guess not, I am using a managed server VPSLatch. I chatted with them and they 
are going to GRANT the permissions I need…at least that is what the tech said. 
I waiting with baited breath ;oP

Thanks!

Don Wieland
d...@pointmade.net
http://www.pointmade.net
https://www.facebook.com/pointmade.band






Re: INTO OUTFILE ERROR...

2014-09-19 Thread Mogens Melander
Maybe you need to grant access from localhost to the user?

On Fri, September 19, 2014 16:59, Don Wieland wrote:
 On Sep 19, 2014, at 7:50 AM, Reindl Harald wrote:

 the target folder don't matter
 that is clearly a *MySQL error* that your *MYSQL user* lack the needed
 permissions

 Yes i figured that - so the question is, how do I give full permissions to
 that user?

 I did go to my cPanel and delete the user and recreated the user adding
 them to the DB with ALL PRIVILEGES. Obviously this is not enough.

 If this is not a simple thing that I can do myself, I am willing to
 compensate someone for support they can offer via GoToMeeting and SKYPE.

 I am spinning my wheels and I need to resolve this issue asap.

 Don Wieland
 d...@pointmade.net
 http://www.pointmade.net
 https://www.facebook.com/pointmade.band





 --
 This message has been scanned for viruses and
 dangerous content by MailScanner, and is
 believed to be clean.




-- 
Mogens Melander
+66 8701 33224


-- 
This message has been scanned for viruses and
dangerous content by MailScanner, and is
believed to be clean.


-- 
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/mysql



ERROR in syntax...

2014-09-06 Thread Don Wieland
Can anyone tell me why this query is generating an ERROR:

DROP TRIGGER rtsadven_development.content_assets_after_insert_subtypes;

CREATE TRIGGER `rtsadven_development`.`content_assets_after_insert_subtypes` 
AFTER INSERT ON `rtsadven_development`.`content_assets`
FOR EACH ROW 
BEGIN

IF NEW.content_asset_type_code = 'CURRI' THEN
   INSERT INTO curriculums (content_asset_id) VALUES (NEW.id);
ELSEIF NEW.content_asset_type_code = 'COURS' THEN
   INSERT INTO courses (content_asset_id) VALUES (NEW.id);
IF NEW.content_asset_type_code = 'DOC' THEN
   INSERT INTO documents (content_asset_id) VALUES (NEW.id);
ELSEIF NEW.content_asset_type_code = 'MODUL' THEN
   INSERT INTO modules (content_asset_id) VALUES (NEW.id);
ELSEIF NEW.content_asset_type_code = 'TOPIC' THEN
   INSERT INTO topics (content_asset_id) VALUES (NEW.id); 
ELSEIF NEW.content_asset_type_code = 'WEBPG' THEN
   INSERT INTO web_pages (content_asset_id) VALUES (NEW.id);
ELSEIF NEW.content_asset_type_code = 'EMAIL' THEN
   INSERT INTO emails (content_asset_id) VALUES (NEW.id);
ELSEIF NEW.content_asset_type_code = 'FBPOST' THEN
   INSERT INTO facebook_posts (content_asset_id) VALUES (NEW.id);
ELSEIF NEW.content_asset_type_code = 'TWEET' THEN
   INSERT INTO tweets (content_asset_id) VALUES (NEW.id); 
ELSEIF NEW.content_asset_type_code = 'CHALL' THEN
   INSERT INTO challenges (content_asset_id) VALUES (NEW.id);
ELSEIF NEW.content_asset_type_code = 'IMAGE' THEN
   INSERT INTO images (content_asset_id) VALUES (NEW.id);
ELSEIF NEW.content_asset_type_code = 'VIDEO' THEN
   INSERT INTO videos (content_asset_id) VALUES (NEW.id);
END IF;

INSERT INTO content_asset_statistics (content_asset_id, 
statistic_type_code, seq) SELECT NEW.id, statistic_type_code, seq from 
content_asset_statistic_types where content_asset_type_code = 
NEW.content_asset_type_code;

END;

Appreciate it.

Don Wieland


--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/mysql



Re: ERROR in syntax...

2014-09-06 Thread hsv
 2014/09/06 09:06 -0700, Don Wieland 
Can anyone tell me why this query is generating an ERROR: 

Which error? The first IF statement is not properly ended? it isn't.

(A series of equality tests against the same variable is done more conveniently 
with CASE ... END CASE.) 


-- 
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/mysql



Re: 1045 Error accessing mysql db

2014-09-05 Thread wagnerbianchi.com
FYI

WB

2014-09-04 21:27 GMT-03:00 정천기 jeongcheo...@gmail.com:

 Hi~~
 I think this trouble because change OS and MySQL grant Initialization..

 Could you please follow my step...

 First.. check your (foo) grant

 root#] mysql -u root -p
 mysql  select * from mysql.user where 'foo';

 there is HOST column.
 HOST column values is '%'..  Must..

 if there is not, you must grant to 'foo'.

 mysql  grant all privileges on *.* to foo@% identified by '';
 mysql  flush privileges;

 Try Login~~

 Second.. Recreate user..

 root#] mysql -u root -p
 mysql  drop user foo;
 mysql  create user 'foo'@'%' IDENTIFIED by '';
 mysql  grant all privileges on *.* to foo@% identified by '';
 mysql  flush privileges;


 Try again Login~~

 My List is Here..

 Have a good day





 2014-09-05 0:54 GMT+09:00 wagnerbianchi.com m...@wagnerbianchi.com:

 Do you know if the Python version has changed? Do you know what was the
 Python version you used to develop your script on CentOS 5? So, If
 anything
 has changed in mysql.user table or even in `foo` user credentials, it
 seems
 that your script must be reviewed and even the Python version in use
 currently must be checked as well...could you let us now if you can log to
 MySQL using the mysql client?

 Something like:

 $ mysql -u foo -p

 Let us know, cheers!!



 --
 *Wagner Bianchi, MySQL Database Specialist*
 Mobile:  +55.31.8654.9510
 E-mail:  m...@wagnerbianchi.com
 Twitter: @wagnerbianchijr


 2014-09-04 11:05 GMT-03:00 Divesh Kamra kamra.div...@gmail.com:

  check weather there any space in localhost
  'localhost
  '
 
  Also check permission for 'foo' user though command
 
  select * from mysql.user where 'foo';
 
 
 
 
  On Thu, Aug 21, 2014 at 6:53 AM, Augori aug...@gmail.com wrote:
 
   After an operating system change (CentOS 5 to CentOS 6), my Python
 script
   could no longer connect with mysql database.  I get the following
  error...
  
   mysql_exceptions.OperationalError: (1045, Access denied for user
 'foo'@
   'localhost
   ' (using password: YES))
  
   I have granted all on all databases to this user.
   I attempted to run mysql_upgrade.
  
   I am stymied because according to another guy, he is successfully
  accessing
   the same database with the same credentials as I am (but in a PHP
  script).
  
   Can any of you suggest an explanation for this?
  
   Thanks in advance!
  
 




 --
 
 정천기  차장, Jeong Cheon Ki , 鄭 天 基
 Home : Seoul
 Mobile : 82(0)10.6261.5356
 E-mail : jeongcheo...@gmail.com
  MSN : jeongcheo...@hotmail.com
 



Re: Getting error while launching mysqld

2014-09-05 Thread wagnerbianchi.com
Have you changed the default mysqld port? Could you share with us the below
command output?

$ my_print_defaults mysqld



--
*Wagner Bianchi, MySQL Database Specialist*
Mobile:  +55.31.8654.9510
E-mail:  m...@wagnerbianchi.com
Twitter: @wagnerbianchijr


2014-09-04 4:33 GMT-03:00 Banerjee, Somnath somnath_baner...@mentor.com:

 Hi,

 We are getting following error while launching mysqld_safe in local
 machine.
 Any help would be appreciated.

 --
 connect to address 127.0.0.1 port 544: Connection refused
 connect to address 127.0.0.1 port 544: Connection refused

 trying normal rsh (/usr/bin/rsh)

 -

 The command used is:

 rsh $HOST -n mysql install dir/bin/mysqld_safe
 --defaults-file=$MYSQL_CONFIG --port=$PORT






RE: Getting error while launching mysqld

2014-09-05 Thread Banerjee, Somnath
Thanks a lot.
I changed rsh to ssh and things worked !

-somnath

From: shawn l.green [shawn.l.gr...@oracle.com]
Sent: Friday, September 05, 2014 8:21 PM
To: mysql@lists.mysql.com
Subject: Re: Getting error while launching mysqld

Hello Somnath,

On 9/4/2014 3:33 AM, Banerjee, Somnath wrote:
 Hi,

 We are getting following error while launching mysqld_safe in local machine.
 Any help would be appreciated.

 --
 connect to address 127.0.0.1 port 544: Connection refused
 connect to address 127.0.0.1 port 544: Connection refused

 trying normal rsh (/usr/bin/rsh)

 -

 The command used is:

 rsh $HOST -n mysql install dir/bin/mysqld_safe 
 --defaults-file=$MYSQL_CONFIG --port=$PORT


This looks more like a problem with your permissions to use the rsh
command than MySQL. MySQL should never operate on port 554 as that is
already reserved for a different well-known service.

--
Shawn Green
MySQL Senior Principal Technical Support Engineer
Oracle USA, Inc. - Hardware and Software, Engineered to Work Together.
Office: Blountville, TN

--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/mysql


--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/mysql



Getting error while launching mysqld

2014-09-04 Thread Banerjee, Somnath
Hi,

We are getting following error while launching mysqld_safe in local machine.
Any help would be appreciated.

--
connect to address 127.0.0.1 port 544: Connection refused
connect to address 127.0.0.1 port 544: Connection refused

trying normal rsh (/usr/bin/rsh)

-

The command used is:

rsh $HOST -n mysql install dir/bin/mysqld_safe --defaults-file=$MYSQL_CONFIG 
--port=$PORT





Re: 1045 Error accessing mysql db

2014-09-04 Thread Divesh Kamra
check weather there any space in localhost
'localhost
'

Also check permission for 'foo' user though command

select * from mysql.user where 'foo';




On Thu, Aug 21, 2014 at 6:53 AM, Augori aug...@gmail.com wrote:

 After an operating system change (CentOS 5 to CentOS 6), my Python script
 could no longer connect with mysql database.  I get the following error...

 mysql_exceptions.OperationalError: (1045, Access denied for user 'foo'@
 'localhost
 ' (using password: YES))

 I have granted all on all databases to this user.
 I attempted to run mysql_upgrade.

 I am stymied because according to another guy, he is successfully accessing
 the same database with the same credentials as I am (but in a PHP script).

 Can any of you suggest an explanation for this?

 Thanks in advance!



Re: 1045 Error accessing mysql db

2014-09-04 Thread wagnerbianchi.com
Do you know if the Python version has changed? Do you know what was the
Python version you used to develop your script on CentOS 5? So, If anything
has changed in mysql.user table or even in `foo` user credentials, it seems
that your script must be reviewed and even the Python version in use
currently must be checked as well...could you let us now if you can log to
MySQL using the mysql client?

Something like:

$ mysql -u foo -p

Let us know, cheers!!



--
*Wagner Bianchi, MySQL Database Specialist*
Mobile:  +55.31.8654.9510
E-mail:  m...@wagnerbianchi.com
Twitter: @wagnerbianchijr


2014-09-04 11:05 GMT-03:00 Divesh Kamra kamra.div...@gmail.com:

 check weather there any space in localhost
 'localhost
 '

 Also check permission for 'foo' user though command

 select * from mysql.user where 'foo';




 On Thu, Aug 21, 2014 at 6:53 AM, Augori aug...@gmail.com wrote:

  After an operating system change (CentOS 5 to CentOS 6), my Python script
  could no longer connect with mysql database.  I get the following
 error...
 
  mysql_exceptions.OperationalError: (1045, Access denied for user 'foo'@
  'localhost
  ' (using password: YES))
 
  I have granted all on all databases to this user.
  I attempted to run mysql_upgrade.
 
  I am stymied because according to another guy, he is successfully
 accessing
  the same database with the same credentials as I am (but in a PHP
 script).
 
  Can any of you suggest an explanation for this?
 
  Thanks in advance!
 



1045 Error accessing mysql db

2014-08-20 Thread Augori
After an operating system change (CentOS 5 to CentOS 6), my Python script
could no longer connect with mysql database.  I get the following error...

mysql_exceptions.OperationalError: (1045, Access denied for user 'foo'@
'localhost
' (using password: YES))

I have granted all on all databases to this user.
I attempted to run mysql_upgrade.

I am stymied because according to another guy, he is successfully accessing
the same database with the same credentials as I am (but in a PHP script).

Can any of you suggest an explanation for this?

Thanks in advance!


sql syntax error

2014-08-08 Thread florent larose
hello, i am working on my personal website wih php 5.4.16 / mysql 5.6.12 (my 
system : windows 7 / wampserver 2).
i have a bug when i am running my connection to database webpage.
My error message is the following :
Erreur SQL : 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 ''membres2' WHERE
'pseudo_membre' = '\'Flarose59\'' GROUP BY 
'id_membre'' at line 1 
Ligne : 29.

this is my php code :
 $result = sqlquery(SELECT COUNT('id_membre') AS nbr, 'id_membre', 
'pseudo_membre', 'mdp_membre' FROM 'espace_membre2'.'membres2' WHERE 
'pseudo_membre' = '\'.mysql_real_escape_string($_POST['pseudo']).\'' GROUP BY 
'id_membre', 1);

I tried several delimitator for the query function (like ' \* ').


  

Re: sql syntax error

2014-08-08 Thread Johan De Meersman
- Original Message -
 From: florent larose florent.lar...@hotmail.com
 Subject: sql syntax error
 
 near ''membres2' WHERE
 [...]
  FROM 'espace_membre2'.'membres2' WHERE

You were on the right path - mysql is wibbly about quotes. Either remove the 
quotes entirely ( espace_membre2.membres2 ) or try backticks ( ` ). They're 
MySQL's favourite quote, presumably because they were convenient to type on 
whatever abomination Monty used to type code :-)

As your code is french, I'll assume you're on Azerty; the backtick is Alt-Gr 
plus the rightmost key (right next to return) on the middle row. Enjoy 
spraining your fingers :-p

/johan

-- 
Unhappiness is discouraged and will be corrected with kitten pictures.

-- 
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/mysql



Re: sql syntax error

2014-08-08 Thread Christophe
Hi,

Le 08/08/2014 17:48, Johan De Meersman a écrit :
 
 As your code is french, I'll assume you're on Azerty; the backtick is Alt-Gr 
 plus the rightmost key (right next to return) on the middle row. Enjoy 
 spraining your fingers :-p
 
 /johan
 

Alt-GR plus '7' for French keyboard layout ;)


Christophe.


--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/mysql



alter table modify syntax error

2014-06-28 Thread Tim Dunphy
Hello,

I'm trying to use a very basic alter table command to position a column
after another column.

This is the table as it exists now:

mysql describe car_table;
+-+--+--+-+-++
| Field | Type | Null | Key | Default | Extra |
+-+--+--+-+-++
| car_id | int(11) | NO | PRI | NULL | auto_increment |
| vin | varchar(17) | YES | | NULL | |
| color | varchar(10) | YES | | NULL | |
| year | decimal(4,0) | YES | | NULL | |
| make | varchar(10) | YES | | NULL | |
| model | varchar(20) | YES | | NULL | |
| howmuch | decimal(5,2) | YES | | NULL | |
+-+--+--+-+-++
7 rows in set (0.03 sec)

I am trying to position the 'color' column after the 'model' column with
the following command:

mysql alter table car_table modify column color after model;

And I'm getting the following error:

ERROR 1064 (42000): 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 'after model' at line 1


I'm just wondering what I'm doing wrong here, because the syntax looks
correct to me!

Thanks

-- 
GPG me!!

gpg --keyserver pool.sks-keyservers.net --recv-keys F186197B


Re: alter table modify syntax error

2014-06-28 Thread Carsten Pedersen

On 28-06-2014 19:11, Tim Dunphy wrote:

Hello,

I'm trying to use a very basic alter table command to position a column
after another column.

This is the table as it exists now:

mysql describe car_table;
+-+--+--+-+-++
| Field | Type | Null | Key | Default | Extra |
+-+--+--+-+-++
| car_id | int(11) | NO | PRI | NULL | auto_increment |
| vin | varchar(17) | YES | | NULL | |
| color | varchar(10) | YES | | NULL | |
| year | decimal(4,0) | YES | | NULL | |
| make | varchar(10) | YES | | NULL | |
| model | varchar(20) | YES | | NULL | |
| howmuch | decimal(5,2) | YES | | NULL | |
+-+--+--+-+-++
7 rows in set (0.03 sec)

I am trying to position the 'color' column after the 'model' column with
the following command:

mysql alter table car_table modify column color after model;

And I'm getting the following error:

ERROR 1064 (42000): 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 'after model' at line 1


Try:
alter table car_table modify column color varchar(10) after model;

/ Carsten

--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/mysql



Re: alter table modify syntax error

2014-06-28 Thread Tim Dunphy
Cool guys, that did it..

ALTER TABLE car_table MODIFY COLUMN color VARCHAR(10) AFTER model;

For some reason the book I'm following doesn't specify that you have to
note the data type in moves! This helped. and thanks again.

Tim


On Sat, Jun 28, 2014 at 1:24 PM, Carsten Pedersen cars...@bitbybit.dk
wrote:

 On 28-06-2014 19:11, Tim Dunphy wrote:

 Hello,

 I'm trying to use a very basic alter table command to position a column
 after another column.

 This is the table as it exists now:

 mysql describe car_table;
 +-+--+--+-+-++
 | Field | Type | Null | Key | Default | Extra |
 +-+--+--+-+-++
 | car_id | int(11) | NO | PRI | NULL | auto_increment |
 | vin | varchar(17) | YES | | NULL | |
 | color | varchar(10) | YES | | NULL | |
 | year | decimal(4,0) | YES | | NULL | |
 | make | varchar(10) | YES | | NULL | |
 | model | varchar(20) | YES | | NULL | |
 | howmuch | decimal(5,2) | YES | | NULL | |
 +-+--+--+-+-++
 7 rows in set (0.03 sec)

 I am trying to position the 'color' column after the 'model' column with
 the following command:

 mysql alter table car_table modify column color after model;

 And I'm getting the following error:

 ERROR 1064 (42000): 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 'after model' at line 1


 Try:
 alter table car_table modify column color varchar(10) after model;

 / Carsten

 --
 MySQL General Mailing List
 For list archives: http://lists.mysql.com/mysql
 To unsubscribe:http://lists.mysql.com/mysql




-- 
GPG me!!

gpg --keyserver pool.sks-keyservers.net --recv-keys F186197B


Re: alter table modify syntax error

2014-06-28 Thread Tim Dunphy
Hey guys,

 Sorry to hit you with one more. But I'm trying to use a positional
statement in a column move based on what you all just taught me:

mysql alter table modify column color varchar(10) sixth;

But I am getting this error:

ERROR 1064 (42000): 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 'column color varchar(10) sixth' at line 1

Here's my table one more time for reference:

mysql describe car_table;
++--+--+-+-++
| Field  | Type | Null | Key | Default | Extra  |
++--+--+-+-++
| car_id | int(11)  | NO   | PRI | NULL| auto_increment |
| vin| varchar(17)  | YES  | | NULL||
| year   | decimal(4,0) | YES  | | NULL||
| make   | varchar(10)  | YES  | | NULL||
| model  | varchar(20)  | YES  | | NULL||
| color  | varchar(10)  | YES  | | NULL||
| price  | decimal(7,2) | YES  | | NULL||
++--+--+-+-++
7 rows in set (0.01 sec)

I appreciate your suggestions so far and it would be great if I could get
some help with this one too.

Thanks
Tim


On Sat, Jun 28, 2014 at 1:34 PM, Tim Dunphy bluethu...@gmail.com wrote:

 Cool guys, that did it..

 ALTER TABLE car_table MODIFY COLUMN color VARCHAR(10) AFTER model;

 For some reason the book I'm following doesn't specify that you have to
 note the data type in moves! This helped. and thanks again.

 Tim


 On Sat, Jun 28, 2014 at 1:24 PM, Carsten Pedersen cars...@bitbybit.dk
 wrote:

 On 28-06-2014 19:11, Tim Dunphy wrote:

 Hello,

 I'm trying to use a very basic alter table command to position a column
 after another column.

 This is the table as it exists now:

 mysql describe car_table;
 +-+--+--+-+-++
 | Field | Type | Null | Key | Default | Extra |
 +-+--+--+-+-++
 | car_id | int(11) | NO | PRI | NULL | auto_increment |
 | vin | varchar(17) | YES | | NULL | |
 | color | varchar(10) | YES | | NULL | |
 | year | decimal(4,0) | YES | | NULL | |
 | make | varchar(10) | YES | | NULL | |
 | model | varchar(20) | YES | | NULL | |
 | howmuch | decimal(5,2) | YES | | NULL | |
 +-+--+--+-+-++
 7 rows in set (0.03 sec)

 I am trying to position the 'color' column after the 'model' column with
 the following command:

 mysql alter table car_table modify column color after model;

 And I'm getting the following error:

 ERROR 1064 (42000): 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 'after model' at line 1


 Try:
 alter table car_table modify column color varchar(10) after model;

 / Carsten

 --
 MySQL General Mailing List
 For list archives: http://lists.mysql.com/mysql
 To unsubscribe:http://lists.mysql.com/mysql




 --
 GPG me!!

 gpg --keyserver pool.sks-keyservers.net --recv-keys F186197B




-- 
GPG me!!

gpg --keyserver pool.sks-keyservers.net --recv-keys F186197B


RE: alter table modify syntax error

2014-06-28 Thread Jesper Wisborg Krogh
Hi Tim,

 -Original Message-
 From: Tim Dunphy [mailto:bluethu...@gmail.com]
 Sent: Sunday, 29 June 2014 03:45
 Cc: mysql@lists.mysql.com
 Subject: Re: alter table modify syntax error
 
 Hey guys,
 
  Sorry to hit you with one more. But I'm trying to use a positional statement
 in a column move based on what you all just taught me:
 
 mysql alter table modify column color varchar(10) sixth;
 
 But I am getting this error:
 
 ERROR 1064 (42000): 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 'column color varchar(10) sixth' at line 1

The syntax sixth is not a supported syntax. You should use the syntax AFTER 
column_name where you replace column_name with the column name you want to 
position the modified column after.

See also: https://dev.mysql.com/doc/refman/5.5/en/alter-table.html

Best regards,
Jesper Krogh
MySQL Support



--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/mysql



Re: alter table modify syntax error

2014-06-28 Thread Tim Dunphy

 The syntax sixth is not a supported syntax. You should use the syntax
 AFTER column_name where you replace column_name with the column name
 you want to position the modified column after.


Oh thanks. That's actually what I ended up doing after I got frustrated
with that error.  I was following the book 'Head First SQL' which was
suggesting that you could do something like what this user was trying in
this stack overflow thread:

http://stackoverflow.com/questions/19175240/re-arranging-columns-in-mysql-using-position-keywords-such-as-first-second

But the answer in that thread too suggests that this is wrong. So is the
Head First SQL book just referring to an outdated syntax that doesn't work
anymore? I can't imagine that it never worked if it's in that book. But hey
ya never know! ;)

Thanks
Tim


On Sat, Jun 28, 2014 at 7:46 PM, Jesper Wisborg Krogh my...@wisborg.dk
wrote:

 Hi Tim,

  -Original Message-
  From: Tim Dunphy [mailto:bluethu...@gmail.com]
  Sent: Sunday, 29 June 2014 03:45
  Cc: mysql@lists.mysql.com
  Subject: Re: alter table modify syntax error
 
  Hey guys,
 
   Sorry to hit you with one more. But I'm trying to use a positional
 statement
  in a column move based on what you all just taught me:
 
  mysql alter table modify column color varchar(10) sixth;
 
  But I am getting this error:
 
  ERROR 1064 (42000): 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 'column color varchar(10) sixth' at line 1

 The syntax sixth is not a supported syntax. You should use the syntax
 AFTER column_name where you replace column_name with the column name
 you want to position the modified column after.

 See also: https://dev.mysql.com/doc/refman/5.5/en/alter-table.html

 Best regards,
 Jesper Krogh
 MySQL Support





-- 
GPG me!!

gpg --keyserver pool.sks-keyservers.net --recv-keys F186197B


RE: alter table modify syntax error

2014-06-28 Thread Jesper Wisborg Krogh
Hi Tim,

 -Original Message-
 From: Tim Dunphy [mailto:bluethu...@gmail.com]
 Sent: Sunday, 29 June 2014 10:09
 To: Jesper Wisborg Krogh
 Cc: mysql@lists.mysql.com
 Subject: Re: alter table modify syntax error
 
 
  The syntax sixth is not a supported syntax. You should use the
  syntax AFTER column_name where you replace column_name with
 the
  column name you want to position the modified column after.
 
 
 Oh thanks. That's actually what I ended up doing after I got frustrated with
 that error.  I was following the book 'Head First SQL' which was suggesting
 that you could do something like what this user was trying in this stack
 overflow thread:
 
 http://stackoverflow.com/questions/19175240/re-arranging-columns-in-
 mysql-using-position-keywords-such-as-first-second
 
 But the answer in that thread too suggests that this is wrong. So is the Head
 First SQL book just referring to an outdated syntax that doesn't work
 anymore? I can't imagine that it never worked if it's in that book. But hey ya
 never know! ;)

Given the title of the book is Head First SQL and not Head First MySQL it 
probably isn't exclusively using syntax for MySQL. While SQL is a standard the 
various SQL databases are not completely identical with the syntax they 
support. This may be due to not completely conforming to the standard, using 
different versions of the SQL standard, or that there is not standard for that 
operation.

Best regards,
Jesper Krogh
MySQL Support



--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/mysql



Re: alter table modify syntax error

2014-06-28 Thread Tim Dunphy

 Given the title of the book is Head First SQL and not Head First MySQL
 it probably isn't exclusively using syntax for MySQL. While SQL is a
 standard the various SQL databases are not completely identical with the
 syntax they support. This may be due to not completely conforming to the
 standard, using different versions of the SQL standard, or that there is
 not standard for that operation.


Hey, that's some good input. Thanks and makes total sense. I guess the
reason I thought I could use that syntax is that the book uses MySQL for
all it's examples and explains that it does so because MySQL is a free and
open source version of SQL that's easy to install. But maybe you're right
and they do depart into other syntaxes of SQL. I just don't know where they
got that 'first, second, third, etc' version of the alter table syntax
from. Definitely not sweatin' this detail tho, I am totally fine with what
you showed me that works.

Thanks again for your input!
Tim


On Sat, Jun 28, 2014 at 9:14 PM, Jesper Wisborg Krogh my...@wisborg.dk
wrote:

 Hi Tim,

  -Original Message-
  From: Tim Dunphy [mailto:bluethu...@gmail.com]
  Sent: Sunday, 29 June 2014 10:09
  To: Jesper Wisborg Krogh
  Cc: mysql@lists.mysql.com
  Subject: Re: alter table modify syntax error
 
  
   The syntax sixth is not a supported syntax. You should use the
   syntax AFTER column_name where you replace column_name with
  the
   column name you want to position the modified column after.
 
 
  Oh thanks. That's actually what I ended up doing after I got frustrated
 with
  that error.  I was following the book 'Head First SQL' which was
 suggesting
  that you could do something like what this user was trying in this stack
  overflow thread:
 
  http://stackoverflow.com/questions/19175240/re-arranging-columns-in-
  mysql-using-position-keywords-such-as-first-second
 
  But the answer in that thread too suggests that this is wrong. So is the
 Head
  First SQL book just referring to an outdated syntax that doesn't work
  anymore? I can't imagine that it never worked if it's in that book. But
 hey ya
  never know! ;)

 Given the title of the book is Head First SQL and not Head First MySQL
 it probably isn't exclusively using syntax for MySQL. While SQL is a
 standard the various SQL databases are not completely identical with the
 syntax they support. This may be due to not completely conforming to the
 standard, using different versions of the SQL standard, or that there is
 not standard for that operation.

 Best regards,
 Jesper Krogh
 MySQL Support





-- 
GPG me!!

gpg --keyserver pool.sks-keyservers.net --recv-keys F186197B


Re: error 29, file not found (errcode: 13)

2014-06-25 Thread thufir
I followed the manpage for mysqlimport:


thufir@dur:~$ 
thufir@dur:~$ mysql -e 'CREATE TABLE imptest(id INT, n VARCHAR(30))' test
ERROR 1045 (28000): Access denied for user 'thufir'@'localhost' (using 
password: NO)
thufir@dur:~$ 
thufir@dur:~$ 
thufir@dur:~$ mysql -e 'CREATE TABLE imptest(id INT, n VARCHAR(30))' test 
-u root -p
Enter password: 
ERROR 1049 (42000): Unknown database 'test'
thufir@dur:~$ 
thufir@dur:~$ mysql -u root -p
Enter password: 
Welcome to the MySQL monitor.  Commands end with ; or \g.
Your MySQL connection id is 54
Server version: 5.5.37-0ubuntu0.14.04.1 (Ubuntu)

Copyright (c) 2000, 2014, Oracle and/or its affiliates. All rights 
reserved.

Oracle is a registered trademark of Oracle Corporation and/or its
affiliates. Other names may be trademarks of their respective
owners.

Type 'help;' or '\h' for help. Type '\c' to clear the current input 
statement.

mysql create database test;
Query OK, 1 row affected (0.01 sec)

mysql quit
Bye
thufir@dur:~$ 
thufir@dur:~$ mysql -e 'CREATE TABLE imptest(id INT, n VARCHAR(30))' test 
-u root -p
Enter password: 
thufir@dur:~$ 
thufir@dur:~$ ed
a
100 Max Sydow
101 Count Dracula
.
w imptest.txt
32
q
thufir@dur:~$ 
thufir@dur:~$ od -c imptest.txt 
000   1   0   0  \t   M   a   x   S   y   d   o   w  \n   1   0
020   1  \t   C   o   u   n   t   D   r   a   c   u   l   a  \n
040
thufir@dur:~$ 
thufir@dur:~$ mysqlimport --local test imptest.txt -u root -p
Enter password: 
test.imptest: Records: 2  Deleted: 0  Skipped: 0  Warnings: 0
thufir@dur:~$ 
thufir@dur:~$ mysql -e 'SELECT * FROM imptest' test -u root -p
Enter password: 
+--+---+
| id   | n |
+--+---+
|  100 | Max Sydow |
|  101 | Count Dracula |
+--+---+
thufir@dur:~$ 
thufir@dur:~$ 


so this looks like the route to go.



-Thufir


-- 
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/mysql



Re: error 29, file not found (errcode: 13)

2014-06-24 Thread Reindl Harald


Am 24.06.2014 07:08, schrieb thufir:
 On Mon, 23 Jun 2014 10:59:48 -0400, Scott Helms wrote:
 
 I generally drop them into /tmp for easy access and cleanup after the
 data load, but you can put them any place that the mysql daemon process
 has access to read.
 
 Huh, maybe the daemon doesn't have access to /tmp?...
 ERROR 29 (HY000): File '/tmp/make_year_model.csv' not found (Errcode: 13)

then file not found is bullshit

these days computers can distinguish between
not exist and no permissions and should reflect
that in the messages they give to humans



signature.asc
Description: OpenPGP digital signature


Re: error 29, file not found (errcode: 13)

2014-06-24 Thread thufir
I think it's apparmor:


thufir@dur:/tmp$ 
thufir@dur:/tmp$ nl /etc/apparmor.d/usr.sbin.mysqld
 1  # vim:syntax=apparmor
 2  # Last Modified: Tue Jun 19 17:37:30 2007
 3  #include tunables/global
   
 4  /usr/sbin/mysqld {
 5#include abstractions/base
 6#include abstractions/nameservice
 7#include abstractions/user-tmp
 8#include abstractions/mysql
 9#include abstractions/winbind
   
10capability dac_override,
11capability sys_resource,
12capability setgid,
13capability setuid,
   
14network tcp,
   
15/etc/hosts.allow r,
16/etc/hosts.deny r,
   
17/etc/mysql/*.pem r,
18/etc/mysql/conf.d/ r,
19/etc/mysql/conf.d/* r,
20/etc/mysql/*.cnf r,
21/usr/lib/mysql/plugin/ r,
22/usr/lib/mysql/plugin/*.so* mr,
23/usr/sbin/mysqld mr,
24/usr/share/mysql/** r,
25/var/log/mysql.log rw,
26/var/log/mysql.err rw,
27/var/lib/mysql/ r,
28/var/lib/mysql/** rwk,
29/var/log/mysql/ r,
30/var/log/mysql/* rw,
31/var/run/mysqld/mysqld.pid rw,
32/var/run/mysqld/mysqld.sock w,
33/run/mysqld/mysqld.pid rw,
34/run/mysqld/mysqld.sock w,
   
35/sys/devices/system/cpu/ r,
   
36# Site-specific additions and overrides. See local/README for 
details.
37#include local/usr.sbin.mysqld
38  }
thufir@dur:/tmp$ 



I need to grant access to /tmp somehow?



thanks,

Thufir


-- 
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/mysql



error 29, file not found (errcode: 13)

2014-06-23 Thread thufir
Apparently this error is because MySQL can't read my home directory?  
Fair enough, but I don't quite follow.  Where would be a good location 
for the CSV file, then?


   thufir@dur:~$
   thufir@dur:~$ mysql -u root -p
   Enter password:
   Welcome to the MySQL monitor.  Commands end with ; or \g.
   Your MySQL connection id is 62
   Server version: 5.5.37-0ubuntu0.14.04.1 (Ubuntu)
   Copyright (c) 2000, 2014, Oracle and/or its affiliates. All rights
   reserved.
   Oracle is a registered trademark of Oracle Corporation and/or its
   affiliates. Other names may be trademarks of their respective
   owners.
   Type 'help;' or '\h' for help. Type '\c' to clear the current input
   statement.
   mysql
   mysql LOAD DATA  INFILE '/home/thufir/make_year_model.csv' INTO
   TABLE vehicles.vehicles FIELDS TERMINATED BY ',' LINES TERMINATED BY
   '\n';
   ERROR 29 (HY000): File '/home/thufir/make_year_model.csv' not found
   (Errcode: 13)
   mysql
   mysql quit
   Bye
   thufir@dur:~$
   thufir@dur:~$ cat /home/thufir/make_year_model.csv
   make1,model1,2012,604,buy now
   make2,model2,2013,780,need to sell
   make3,model3,2001,780,cheap
   thufir@dur:~$



thanks,

Thufir



Re: error 29, file not found (errcode: 13)

2014-06-23 Thread Scott Helms
I generally drop them into /tmp for easy access and cleanup after the data
load, but you can put them any place that the mysql daemon process has
access to read.


Scott Helms
Vice President of Technology
ZCorum
(678) 507-5000

http://twitter.com/kscotthelms



On Mon, Jun 23, 2014 at 10:52 AM, thufir hawat.thu...@gmail.com wrote:

 Apparently this error is because MySQL can't read my home directory?  Fair
 enough, but I don't quite follow.  Where would be a good location for the
 CSV file, then?

thufir@dur:~$
thufir@dur:~$ mysql -u root -p
Enter password:
Welcome to the MySQL monitor.  Commands end with ; or \g.
Your MySQL connection id is 62
Server version: 5.5.37-0ubuntu0.14.04.1 (Ubuntu)
Copyright (c) 2000, 2014, Oracle and/or its affiliates. All rights
reserved.
Oracle is a registered trademark of Oracle Corporation and/or its
affiliates. Other names may be trademarks of their respective
owners.
Type 'help;' or '\h' for help. Type '\c' to clear the current input
statement.
mysql
mysql LOAD DATA  INFILE '/home/thufir/make_year_model.csv' INTO
TABLE vehicles.vehicles FIELDS TERMINATED BY ',' LINES TERMINATED BY
'\n';
ERROR 29 (HY000): File '/home/thufir/make_year_model.csv' not found
(Errcode: 13)
mysql
mysql quit
Bye
thufir@dur:~$
thufir@dur:~$ cat /home/thufir/make_year_model.csv
make1,model1,2012,604,buy now
make2,model2,2013,780,need to sell
make3,model3,2001,780,cheap
thufir@dur:~$



 thanks,

 Thufir




Re: error 29, file not found (errcode: 13)

2014-06-23 Thread Michael Dykman
Often, one uses /tmp or set up an appropriately premoissioned folder under /var

On Mon, Jun 23, 2014 at 10:52 AM, thufir hawat.thu...@gmail.com wrote:
 Apparently this error is because MySQL can't read my home directory?  Fair
 enough, but I don't quite follow.  Where would be a good location for the
 CSV file, then?

thufir@dur:~$
thufir@dur:~$ mysql -u root -p
Enter password:
Welcome to the MySQL monitor.  Commands end with ; or \g.
Your MySQL connection id is 62
Server version: 5.5.37-0ubuntu0.14.04.1 (Ubuntu)
Copyright (c) 2000, 2014, Oracle and/or its affiliates. All rights
reserved.
Oracle is a registered trademark of Oracle Corporation and/or its
affiliates. Other names may be trademarks of their respective
owners.
Type 'help;' or '\h' for help. Type '\c' to clear the current input
statement.
mysql
mysql LOAD DATA  INFILE '/home/thufir/make_year_model.csv' INTO
TABLE vehicles.vehicles FIELDS TERMINATED BY ',' LINES TERMINATED BY
'\n';
ERROR 29 (HY000): File '/home/thufir/make_year_model.csv' not found
(Errcode: 13)
mysql
mysql quit
Bye
thufir@dur:~$
thufir@dur:~$ cat /home/thufir/make_year_model.csv
make1,model1,2012,604,buy now
make2,model2,2013,780,need to sell
make3,model3,2001,780,cheap
thufir@dur:~$



 thanks,

 Thufir




-- 
 - michael dykman
 - mdyk...@gmail.com

 May the Source be with you.

-- 
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/mysql



Re: error 29, file not found (errcode: 13)

2014-06-23 Thread Carsten Pedersen
Or use the LOCAL diective to have the client send the csv file contents 
to the server.


/ Carsten


On 23-06-2014 16:59, Scott Helms wrote:

I generally drop them into /tmp for easy access and cleanup after the data
load, but you can put them any place that the mysql daemon process has
access to read.


Scott Helms
Vice President of Technology
ZCorum
(678) 507-5000

http://twitter.com/kscotthelms



On Mon, Jun 23, 2014 at 10:52 AM, thufir hawat.thu...@gmail.com wrote:


Apparently this error is because MySQL can't read my home directory?  Fair
enough, but I don't quite follow.  Where would be a good location for the
CSV file, then?

thufir@dur:~$
thufir@dur:~$ mysql -u root -p
Enter password:
Welcome to the MySQL monitor.  Commands end with ; or \g.
Your MySQL connection id is 62
Server version: 5.5.37-0ubuntu0.14.04.1 (Ubuntu)
Copyright (c) 2000, 2014, Oracle and/or its affiliates. All rights
reserved.
Oracle is a registered trademark of Oracle Corporation and/or its
affiliates. Other names may be trademarks of their respective
owners.
Type 'help;' or '\h' for help. Type '\c' to clear the current input
statement.
mysql
mysql LOAD DATA  INFILE '/home/thufir/make_year_model.csv' INTO
TABLE vehicles.vehicles FIELDS TERMINATED BY ',' LINES TERMINATED BY
'\n';
ERROR 29 (HY000): File '/home/thufir/make_year_model.csv' not found
(Errcode: 13)
mysql
mysql quit
Bye
thufir@dur:~$
thufir@dur:~$ cat /home/thufir/make_year_model.csv
make1,model1,2012,604,buy now
make2,model2,2013,780,need to sell
make3,model3,2001,780,cheap
thufir@dur:~$



thanks,

Thufir






--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/mysql



Re: error 29, file not found (errcode: 13)

2014-06-23 Thread Divesh Kamra
Sol :- 
Change file owner to mysql.mysql 
  OR
Change folder and file mode to 777


DK Sent from Phone

 On 23-Jun-2014, at 8:22 pm, thufir hawat.thu...@gmail.com wrote:
 
 Apparently this error is because MySQL can't read my home directory?  Fair 
 enough, but I don't quite follow.  Where would be a good location for the CSV 
 file, then?
 
   thufir@dur:~$
   thufir@dur:~$ mysql -u root -p
   Enter password:
   Welcome to the MySQL monitor.  Commands end with ; or \g.
   Your MySQL connection id is 62
   Server version: 5.5.37-0ubuntu0.14.04.1 (Ubuntu)
   Copyright (c) 2000, 2014, Oracle and/or its affiliates. All rights
   reserved.
   Oracle is a registered trademark of Oracle Corporation and/or its
   affiliates. Other names may be trademarks of their respective
   owners.
   Type 'help;' or '\h' for help. Type '\c' to clear the current input
   statement.
   mysql
   mysql LOAD DATA  INFILE '/home/thufir/make_year_model.csv' INTO
   TABLE vehicles.vehicles FIELDS TERMINATED BY ',' LINES TERMINATED BY
   '\n';
   ERROR 29 (HY000): File '/home/thufir/make_year_model.csv' not found
   (Errcode: 13)
   mysql
   mysql quit
   Bye
   thufir@dur:~$
   thufir@dur:~$ cat /home/thufir/make_year_model.csv
   make1,model1,2012,604,buy now
   make2,model2,2013,780,need to sell
   make3,model3,2001,780,cheap
   thufir@dur:~$
 
 
 
 thanks,
 
 Thufir
 

--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/mysql



Re: error 29, file not found (errcode: 13)

2014-06-23 Thread thufir
On Mon, 23 Jun 2014 10:59:48 -0400, Scott Helms wrote:

 I generally drop them into /tmp for easy access and cleanup after the
 data load, but you can put them any place that the mysql daemon process
 has access to read.


Huh, maybe the daemon doesn't have access to /tmp?...

thufir@dur:/tmp$ 
thufir@dur:/tmp$ ll /tmp/make_year_model.csv 
-rw-rw-r-- 1 thufir thufir 83 Jun 23 22:04 /tmp/make_year_model.csv
thufir@dur:/tmp$ 
thufir@dur:/tmp$ nl /tmp/make_year_model.csv 
   
 1  make1,model1,2012,123,red
 2  make2,model2,2013,456,blue
 3  make3,model3,2001,789,green
   
thufir@dur:/tmp$ 
thufir@dur:/tmp$ mysql -u root -p
Enter password: 
Welcome to the MySQL monitor.  Commands end with ; or \g.
Your MySQL connection id is 55
Server version: 5.5.37-0ubuntu0.14.04.1 (Ubuntu)

Copyright (c) 2000, 2014, Oracle and/or its affiliates. All rights 
reserved.

Oracle is a registered trademark of Oracle Corporation and/or its
affiliates. Other names may be trademarks of their respective
owners.

Type 'help;' or '\h' for help. Type '\c' to clear the current input 
statement.

mysql 
mysql LOAD DATA  INFILE '/tmp/make_year_model.csv' INTO TABLE 
vehicles.vehicles FIELDS TERMINATED BY ',' LINES TERMINATED BY '\n';
ERROR 29 (HY000): File '/tmp/make_year_model.csv' not found (Errcode: 13)
mysql 
mysql quit
Bye
thufir@dur:/tmp$ 


-- 
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/mysql



Re: MySQL UUID_SHORT() gives error Out of range value for column

2014-06-21 Thread Roberta Jaskolski
 2014/06/20 11:31 +0100, Neil Tompkins 
I'm using MySQL 5.6.17 on Amazon Web Services RDS and when calling SELECT
UUID_SHORT() I'm getting a number bigger than 9223372036854775807. For
example the number I get is

12057145185130250250 

help uuid_short

Name: 'UUID_SHORT'
Description:
Syntax:
UUID_SHORT()

Returns a short universal identifier as a 64-bit unsigned integer
(rather than a string-form 128-bit identifier as returned by the UUID()
function).


That is one bit longer than you are aiming for.


-- 
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/mysql



MySQL UUID_SHORT() gives error Out of range value for column

2014-06-20 Thread Neil Tompkins
Hi,

I'm using MySQL 5.6.17 on Amazon Web Services RDS and when calling SELECT
UUID_SHORT() I'm getting a number bigger than 9223372036854775807. For
example the number I get is

12057145185130250250

The problem is in my table I have a column as BIGINT(20) unsigned, but when
storing a number 12057145185130250250 I get the error MySQL 22003

'MySQL 22003 Out of range value for column '' at row 1'

If I run SELECT UUID_SHORT() on our test server which is MySQL 5.6.11
(running on Windows 2008 64x) the result is as follows;

23526798209843216

I changed the column I'm trying to save my number to, as BIGINT(20)
unsigned, but still get this error.

Any ideas why ?

Cheers
Neil


Re: mysql Access denied error

2014-05-09 Thread Divesh Kamra
Edward , use following way

mysql -uroot -p -h{host ip }

else  give grant  privileges to localhost



On Mon, May 5, 2014 at 7:47 AM, EdwardKing zhan...@neusoft.com wrote:

 I use mysql to create a database and grant rights to a user
 hadooptest,then I use hadooptest to login mysql and use the database,but it
 failed. Why raise error after I grant rights? How to solve it? Thanks.

 My operation is follows:

 [hadoop@master ~]$ mysql -h localhost -u root -p
 Enter password:
 Welcome to the MySQL monitor.  Commands end with ; or \g.
 Your MySQL connection id is 3
 Server version: 5.5.37-log MySQL Community Server (GPL)

 Copyright (c) 2000, 2014, Oracle and/or its affiliates. All rights
 reserved.

 Oracle is a registered trademark of Oracle Corporation and/or its
 affiliates. Other names may be trademarks of their respective
 owners.

 Type 'help;' or '\h' for help. Type '\c' to clear the current input
 statement.

 mysql create database hadooptest;
 mysql grant all on hadooptest.* to 'hadoopuser'@'%' identified by
 '123456';
 Query OK, 0 rows affected (0.00 sec)

 mysql flush priviledges;
 ERROR 1064 (42000): 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 'priviledges' at line 1
 mysql flush privileges;
 Query OK, 0 rows affected (0.00 sec)

 mysql quit;
 Bye

 Then I use hadoopuser  with password 123456
 [hadoop@master ~]$ mysql -u hadoopuser -p
 Enter password:
 ERROR 1045 (28000): Access denied for user 'hadoopuser'@'localhost'
 (using password: YES)



 ---
 Confidentiality Notice: The information contained in this e-mail and any
 accompanying attachment(s)
 is intended only for the use of the intended recipient and may be
 confidential and/or privileged of
 Neusoft Corporation, its subsidiaries and/or its affiliates. If any reader
 of this communication is
 not the intended recipient, unauthorized use, forwarding, printing,
  storing, disclosure or copying
 is strictly prohibited, and may be unlawful.If you have received this
 communication in error,please
 immediately notify the sender by return e-mail, and delete the original
 message and all copies from
 your system. Thank you.

 ---



Re: mysql Access denied error

2014-05-05 Thread Manuel Arostegui
2014-05-05 4:17 GMT+02:00 EdwardKing zhan...@neusoft.com:

 I use mysql to create a database and grant rights to a user
 hadooptest,then I use hadooptest to login mysql and use the database,but it
 failed. Why raise error after I grant rights? How to solve it? Thanks.

 My operation is follows:

 [hadoop@master ~]$ mysql -h localhost -u root -p
 Enter password:
 Welcome to the MySQL monitor.  Commands end with ; or \g.
 Your MySQL connection id is 3
 Server version: 5.5.37-log MySQL Community Server (GPL)

 Copyright (c) 2000, 2014, Oracle and/or its affiliates. All rights
 reserved.

 Oracle is a registered trademark of Oracle Corporation and/or its
 affiliates. Other names may be trademarks of their respective
 owners.

 Type 'help;' or '\h' for help. Type '\c' to clear the current input
 statement.

 mysql create database hadooptest;
 mysql grant all on hadooptest.* to 'hadoopuser'@'%' identified by
 '123456';
 Query OK, 0 rows affected (0.00 sec)

 mysql flush priviledges;
 ERROR 1064 (42000): 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 'priviledges' at line 1
 mysql flush privileges;
 Query OK, 0 rows affected (0.00 sec)

 mysql quit;
 Bye

 Then I use hadoopuser  with password 123456
 [hadoop@master ~]$ mysql -u hadoopuser -p
 Enter password:
 ERROR 1045 (28000): Access denied for user 'hadoopuser'@'localhost'
 (using password: YES)



Hello,

I assume MySQL is listening in 3306 so:
Try this:  mysql -u hadoopuser -plocalhost (or 127.0.0.1)

% doesn't match localhost so if you don't specify it you will be
attempting to connect via Unix Socket.
If you don't want to specify -hlocalhost all the time, just do the grant
with @localhost instead of @%

Hope this helps
Manuel.


Re: mysql Access denied error

2014-05-05 Thread Reindl Harald


Am 05.05.2014 08:34, schrieb Manuel Arostegui:
 % doesn't match localhost so if you don't specify it you will be
 attempting to connect via Unix Socket.
 If you don't want to specify -hlocalhost all the time, just do the grant
 with @localhost instead of @%

nonsense

% matches *any host*



signature.asc
Description: OpenPGP digital signature


Re: mysql Access denied error

2014-05-05 Thread Manuel Arostegui
2014-05-05 10:00 GMT+02:00 Reindl Harald h.rei...@thelounge.net:



 Am 05.05.2014 08:34, schrieb Manuel Arostegui:
  % doesn't match localhost so if you don't specify it you will be
  attempting to connect via Unix Socket.
  If you don't want to specify -hlocalhost all the time, just do the grant
  with @localhost instead of @%

 nonsense

 % matches *any host*


Do the test yourself.


Re: mysql Access denied error

2014-05-05 Thread Reindl Harald


Am 05.05.2014 10:19, schrieb Manuel Arostegui:
 2014-05-05 10:00 GMT+02:00 Reindl Harald h.rei...@thelounge.net 
 mailto:h.rei...@thelounge.net:
 
 Am 05.05.2014 08:34, schrieb Manuel Arostegui:
  % doesn't match localhost so if you don't specify it you will be
  attempting to connect via Unix Socket.
  If you don't want to specify -hlocalhost all the time, just do the grant
  with @localhost instead of @%
 
 nonsense
 
 % matches *any host*
 
 Do the test yourself

i don't need to test such basics since i am working
as mysql administrator the last 11 years and curently
responsible for some hundret databases heavily using
host specific permissions

http://dev.mysql.com/doc/refman/5.5/en/connection-access.html
'%' 'fred'  fred, connecting from any host



signature.asc
Description: OpenPGP digital signature


Re: mysql Access denied error

2014-05-05 Thread Manuel Arostegui
2014-05-05 10:57 GMT+02:00 Reindl Harald h.rei...@thelounge.net:



 Am 05.05.2014 10:19, schrieb Manuel Arostegui:
  2014-05-05 10:00 GMT+02:00 Reindl Harald h.rei...@thelounge.netmailto:
 h.rei...@thelounge.net:
 
  Am 05.05.2014 08:34, schrieb Manuel Arostegui:
   % doesn't match localhost so if you don't specify it you will be
   attempting to connect via Unix Socket.
   If you don't want to specify -hlocalhost all the time, just do the
 grant
   with @localhost instead of @%
 
  nonsense
 
  % matches *any host*
 
  Do the test yourself

 i don't need to test such basics since i am working
 as mysql administrator the last 11 years and curently
 responsible for some hundret databases heavily using
 host specific permissions


Good for you.
I might be working somewhere bigger than that.

Here is what I am talking about:


mysql  grant all on hadooptest.* to 'hadoopuser'@'%' identified by
'123456'; flush privileges;
Query OK, 0 rows affected (0.01 sec)

Query OK, 0 rows affected (0.00 sec)

mysql


# mysql -uhadoopuser -p123456
ERROR 1045 (28000): Access denied for user 'hadoopuser'@'localhost' (using
password: YES)

# mysql -uhadoopuser -p123456 -hlocalhost
Welcome to the MySQL monitor.  Commands end with ; or \g.
Your MySQL connection id is 392245
snip


---


mysql drop user 'hadoopuser'@'%'; flush privileges;
Query OK, 0 rows affected (0.00 sec)

Query OK, 0 rows affected (0.00 sec)

mysql  grant all on hadooptest.* to 'hadoopuser'@'localhost' identified by
'123456'; flush privileges;
Query OK, 0 rows affected (0.00 sec)

Query OK, 0 rows affected (0.00 sec)

# mysql -uhadoopuser -p123456
Welcome to the MySQL monitor.  Commands end with ; or \g.
Your MySQL connection id is 392191
snip


I have been reading your impoliteness in this list for years. You are well
known in this (and other) lists for being like that. So I am not going to
start a fight over the list and this will be my last message in this thread.
Hopefully I have helped the original poster with my point.

Good luck with your hundreds of databases.

Manuel.


Re: mysql Access denied error

2014-05-05 Thread Jigal van Hemert

Hi,

On 5-5-2014 10:57, Reindl Harald wrote:



Am 05.05.2014 10:19, schrieb Manuel Arostegui:

2014-05-05 10:00 GMT+02:00 Reindl Harald h.rei...@thelounge.net 
mailto:h.rei...@thelounge.net:

 Am 05.05.2014 08:34, schrieb Manuel Arostegui:
  % doesn't match localhost so if you don't specify it you will be
  attempting to connect via Unix Socket.
  If you don't want to specify -hlocalhost all the time, just do the grant
  with @localhost instead of @%

 nonsense

 % matches *any host*

Do the test yourself


i don't need to test such basics since i am working
as mysql administrator the last 11 years and curently
responsible for some hundret databases heavily using
host specific permissions

http://dev.mysql.com/doc/refman/5.5/en/connection-access.html
'%' 'fred'  fred, connecting from any host


In that case you would know that connecting via a Unix socket is not the 
same as connection via a network.


See:
http://bugs.mysql.com/bug.php?id=69570
http://dev.mysql.com/doc/refman/5.5/en/connecting.html


--
Kind regards / met vriendelijke groet,

Jigal van Hemert.

--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/mysql



Re: mysql Access denied error

2014-05-05 Thread Reindl Harald


Am 05.05.2014 11:12, schrieb Jigal van Hemert:
 On 5-5-2014 10:57, Reindl Harald wrote:


 Am 05.05.2014 10:19, schrieb Manuel Arostegui:
 2014-05-05 10:00 GMT+02:00 Reindl Harald h.rei...@thelounge.net 
 mailto:h.rei...@thelounge.net:

  Am 05.05.2014 08:34, schrieb Manuel Arostegui:
   % doesn't match localhost so if you don't specify it you will be
   attempting to connect via Unix Socket.
   If you don't want to specify -hlocalhost all the time, just do the 
 grant
   with @localhost instead of @%

  nonsense

  % matches *any host*

 Do the test yourself

 i don't need to test such basics since i am working
 as mysql administrator the last 11 years and curently
 responsible for some hundret databases heavily using
 host specific permissions

 http://dev.mysql.com/doc/refman/5.5/en/connection-access.html
 '%''fred'fred, connecting from any host
 
 In that case you would know that connecting via a Unix socket is not the same 
 as connection via a network.
 
 See:
 http://bugs.mysql.com/bug.php?id=69570
 http://dev.mysql.com/doc/refman/5.5/en/connecting.html

i know that, but it does not change the fact that here
are mysql users in production which are using % and
accessed via localhost unix-socket as well as via
TCP from remote-machines with mysql-over-ssl

maybe MariaDB don't have that bug and it is a bug
if you can't connect with a user specified with %
over the unix-socket independent what some guy
from Oracle pretends




signature.asc
Description: OpenPGP digital signature


Re: mysql Access denied error

2014-05-05 Thread Johan De Meersman
- Original Message - 
 From: Reindl Harald h.rei...@thelounge.net 
 
 i know that, but it does not change the fact that here 

Either you didn't know that but have trouble admitting it; or you did but 
conciously chose to be rude and condescending instead of helpful. 

Your choice. In the second scenario, I can only wonder what you're doing on 
this list. 

-- 
Unhappiness is discouraged and will be corrected with kitten pictures. 


Re: mysql Access denied error

2014-05-05 Thread Reindl Harald
Am 05.05.2014 15:26, schrieb Johan De Meersman:
 - Original Message - 
 From: Reindl Harald h.rei...@thelounge.net 

 i know that, but it does not change the fact that here 
 
 Either you didn't know that but have trouble admitting it; or you did but 
 conciously chose to be rude and condescending instead of helpful. 
 
 Your choice. In the second scenario, I can only wonder what you're doing on 
 this list

oh, did your off-list message find it's way to the list
the answer remains the same

* i did know that about 10 years now
* i have % instead localhost in use here for users
* these users just work with unix-socket / localhost
* period

understand that i speak about living and working setups
in front of me and not about theory



signature.asc
Description: OpenPGP digital signature


Re: mysql Access denied error

2014-05-05 Thread Peter Brawley

On 2014-05-04 9:17 PM, EdwardKing wrote:

I use mysql to create a database and grant rights to a user hadooptest,then I 
use hadooptest to login mysql and use the database,but it failed. Why raise 
error after I grant rights? How to solve it? Thanks.


The command sequence ...


mysql create database hadooptest;
mysql grant all on hadooptest.* to 'hadoopuser'@'%' identified by '123456';
mysql quit;
mysql -u hadoopuser -p
Enter password:


works fine, so your problem is due to something other than these 
commands, possibly other entries in the mysql.user or mysql.db table.


PB


--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/mysql



mysql Access denied error

2014-05-04 Thread EdwardKing
I use mysql to create a database and grant rights to a user hadooptest,then I 
use hadooptest to login mysql and use the database,but it failed. Why raise 
error after I grant rights? How to solve it? Thanks.

My operation is follows:

[hadoop@master ~]$ mysql -h localhost -u root -p
Enter password: 
Welcome to the MySQL monitor.  Commands end with ; or \g.
Your MySQL connection id is 3
Server version: 5.5.37-log MySQL Community Server (GPL)

Copyright (c) 2000, 2014, Oracle and/or its affiliates. All rights reserved.

Oracle is a registered trademark of Oracle Corporation and/or its
affiliates. Other names may be trademarks of their respective
owners.

Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.

mysql create database hadooptest;
mysql grant all on hadooptest.* to 'hadoopuser'@'%' identified by '123456';
Query OK, 0 rows affected (0.00 sec)

mysql flush priviledges;
ERROR 1064 (42000): 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 
'priviledges' at line 1
mysql flush privileges;
Query OK, 0 rows affected (0.00 sec)

mysql quit;
Bye

Then I use hadoopuser  with password 123456
[hadoop@master ~]$ mysql -u hadoopuser -p
Enter password:
ERROR 1045 (28000): Access denied for user 'hadoopuser'@'localhost' (using 
password: YES)

 
---
Confidentiality Notice: The information contained in this e-mail and any 
accompanying attachment(s) 
is intended only for the use of the intended recipient and may be confidential 
and/or privileged of 
Neusoft Corporation, its subsidiaries and/or its affiliates. If any reader of 
this communication is 
not the intended recipient, unauthorized use, forwarding, printing,  storing, 
disclosure or copying 
is strictly prohibited, and may be unlawful.If you have received this 
communication in error,please 
immediately notify the sender by return e-mail, and delete the original message 
and all copies from 
your system. Thank you. 
---


[5.1 Vs 5.5 ] ERROR 1045 (28000): Access denied for user 'testuser'@'Serv1.corp.domain.in' (using password: YES)

2014-04-03 Thread Vinay Gupta
Hi,

I am trying to connect two mysql servers with different versions ( 5.1 
5.5 ) . But in Mysql 5.1 i am facing strange issues.

Below testuser exists in both Mysql Versions :


mysql select host,user,password from mysql.user where user='testuser';
+---++---+
| host  | user   |
password  |
+---++---+
| localhost | testuser   | *FJHHEU5746DDHDUDYDH66488 |
| %.corp.domain.in| testuser   | *FJHHEU5746DDHDUDYDH66488 |
+---++---+

and skip_networking is OFF


*Mysql Version : 5.1.58-log*

root@Serv1:~# mysql -utestuser -p@8AsnM0! -h $(hostname)
ERROR 1045 (28000): Access denied for user 'testuser'@'Serv1.corp.domain.in'
(using password: YES)

It connect successfully if i remove -h option because it connects by
localhost then

*Mysql version : 5.5.36-log *

root@Serv2:~# mysql -utestuser -p@8AsnM0! -h $(hostname)
Welcome to the MySQL monitor.  Commands end with ; or \g.
Server version: 5.5.36-log MySQL Community Server (GPL)
mysql

mysql select user(),current_user();
+--+---+
| user()   |
current_user()|
+--+---+
| testu...@serv2.corp.domain.in| testuser@%.corp.domain.in
   |
+--+---+

Is dere some bug in Mysql5.1 or i need to set bind_address parameter in it.

Thanks


error - ould be looked up with ./bin/resolveip

2014-02-05 Thread Érico
hi

I am facing the following :

mac:mysql-5.6.16-linux-glibc2.5-x86_64 ericomtx$ sudo
scripts/mysql_install_db --user=mysql
sh: ./bin/my_print_defaults: cannot execute binary file
FATAL ERROR: Neither host 'mac.local' nor 'localhost' could be looked up
with
./bin/resolveip
Please configure the 'hostname' command to return a correct
hostname.
If you want to solve this at a later stage, restart this script
with the --force option

how my /etc/hosts file should look like so I can fix this ?


Re: error - ould be looked up with ./bin/resolveip

2014-02-05 Thread Morgan Tocker
Hi Érico,

 mac:mysql-5.6.16-linux-glibc2.5-x86_64 ericomtx$ sudo
 scripts/mysql_install_db --user=mysql
 sh: ./bin/my_print_defaults: cannot execute binary file
 FATAL ERROR: Neither host 'mac.local' nor 'localhost' could be looked up
 with
 ./bin/resolveip
 Please configure the 'hostname' command to return a correct
 hostname.
 If you want to solve this at a later stage, restart this script
 with the --force option
 
 how my /etc/hosts file should look like so I can fix this ?


The hostname resolving script is used to build the privileges tables.

Here is what I have in /etc/hosts on my OS X laptop:

morgo@Rbook:~$ cat /etc/hosts
##
# Host Database
#
# localhost is used to configure the loopback interface
# when the system is booting.  Do not change this entry.
##
127.0.0.1   localhost
255.255.255.255 broadcasthost
::1 localhost
fe80::1%lo0 localhost

127.0.0.1   rbook


- Morgan
--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/mysql



Re: ERROR 2013 (HY000): Lost connection to MySQL server during query

2014-01-08 Thread Manuel Arostegui
2014/1/7 h...@tbbs.net

  2014/01/06 17:07 +0100, Reindl Harald 
 what about look in the servers logfiles
 most likely max_allowed_packet laughable low
 
 Is this then, too, likly when the server and the client are the same
 machine?

 I left this out, that it only then happens when the client has been idle,
 and right afterwards the client repeats the request and all goes well. The
 message is no more than an irritatind break between request and fulfillment.

 Hello,

That happens when you're trying to re-use an existing connection which
wasn't properly closed and as you said, it's been idle. When you repeat the
operation, the thread is created again and thus everything goes normal.

Review the following variables

wait_timeout
net_write_timeout
net_read_timeout


Manu


Re: ERROR 2013 (HY000): Lost connection to MySQL server during query

2014-01-07 Thread hsv
 2014/01/06 17:07 +0100, Reindl Harald 
what about look in the servers logfiles
most likely max_allowed_packet laughable low 

Is this then, too, likly when the server and the client are the same machine?

I left this out, that it only then happens when the client has been idle, and 
right afterwards the client repeats the request and all goes well. The message 
is no more than an irritatind break between request and fulfillment.


-- 
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/mysql



ERROR 2013 (HY000): Lost connection to MySQL server during query

2014-01-06 Thread hsv
Now that I installed 5.6.14 on our Vista machine, when using mysql I often 
see that error-message, which under 5.5.8 I never saw. What is going on?


-- 
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/mysql



Re: ERROR 2013 (HY000): Lost connection to MySQL server during query

2014-01-06 Thread Reindl Harald


Am 06.01.2014 15:36, schrieb h...@tbbs.net:
 Now that I installed 5.6.14 on our Vista machine, when using mysql I often 
 see that error-message, which under 5.5.8 I never saw. What is going on?

what about look in the servers logfiles
most likely max_allowed_packet laughable low



signature.asc
Description: OpenPGP digital signature


InnoDB error 5

2013-11-21 Thread Paul Halliday
Had a system crash this morning and I can't seem to get mysql back up
and running. This is the error:

InnoDB: Progress in percent: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17
18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40
41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63
64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86
87 88 89 90 91 92 93 94 95 96 97 98 99 2013-11-21 08:47:26 1570
[ERROR] InnoDB: Tried to read 16384 bytes at offset 589824. Was only
able to read -1.
2013-11-21 08:47:26 802808c00  InnoDB: Operating system error number 5
in a file operation.
InnoDB: Error number 5 means 'Input/output error'.
InnoDB: Some operating system error numbers are described at
InnoDB: http://dev.mysql.com/doc/refman/5.6/en/operating-system-error-codes.html
2013-11-21 08:47:26 802808c00  InnoDB: File operation call: 'read'
returned OS error 105.
2013-11-21 08:47:26 802808c00  InnoDB: Cannot continue operation.

I followed that link but it doesn't tell me anything outside of what
is above. Can I fix this?

Thanks.

-- 
Paul Halliday
http://www.pintumbler.org/

-- 
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/mysql



Re: InnoDB error 5

2013-11-21 Thread Manuel Arostegui
2013/11/21 Reindl Harald h.rei...@thelounge.net


 Am 21.11.2013 13:51, schrieb Paul Halliday:
  Had a system crash this morning and I can't seem to get mysql back up
  and running. This is the error:
 
  InnoDB: Progress in percent: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17
  18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40
  41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63
  64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86
  87 88 89 90 91 92 93 94 95 96 97 98 99 2013-11-21 08:47:26 1570
  [ERROR] InnoDB: Tried to read 16384 bytes at offset 589824. Was only
  able to read -1.
  2013-11-21 08:47:26 802808c00  InnoDB: Operating system error number 5
  in a file operation.
  InnoDB: Error number 5 means 'Input/output error'.
  InnoDB: Some operating system error numbers are described at
  InnoDB:
 http://dev.mysql.com/doc/refman/5.6/en/operating-system-error-codes.html
  2013-11-21 08:47:26 802808c00  InnoDB: File operation call: 'read'
  returned OS error 105.
  2013-11-21 08:47:26 802808c00  InnoDB: Cannot continue operation.
 
  I followed that link but it doesn't tell me anything outside of what
  is above. Can I fix this?

 i would look in the *system logs* because this pretty sure comes
 from the underlying operating system and is *not* mysql specific
 which is also in the message statet with returned OS error 105


 http://lxr.free-electrons.com/source/include/uapi/asm-generic/errno-base.h#L8


Looks like a broken disk or FS corruption :-(

Good luck!
Manuel.


Re: InnoDB error 5

2013-11-21 Thread Paul Halliday
It was indeed corruption :/ what a day. I was able to move everything
over to another partition and have managed to get mysql up and running
again.  There was a single file I could not, an .idb (the ,.frm is
there). Is it possible to fix this from ibdata or the logs?

Thanks.

On Thu, Nov 21, 2013 at 9:46 AM, Manuel Arostegui man...@tuenti.com wrote:
 2013/11/21 Reindl Harald h.rei...@thelounge.net


 Am 21.11.2013 13:51, schrieb Paul Halliday:
  Had a system crash this morning and I can't seem to get mysql back up
  and running. This is the error:
 
  InnoDB: Progress in percent: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17
  18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40
  41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63
  64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86
  87 88 89 90 91 92 93 94 95 96 97 98 99 2013-11-21 08:47:26 1570
  [ERROR] InnoDB: Tried to read 16384 bytes at offset 589824. Was only
  able to read -1.
  2013-11-21 08:47:26 802808c00  InnoDB: Operating system error number 5
  in a file operation.
  InnoDB: Error number 5 means 'Input/output error'.
  InnoDB: Some operating system error numbers are described at
  InnoDB:
 http://dev.mysql.com/doc/refman/5.6/en/operating-system-error-codes.html
  2013-11-21 08:47:26 802808c00  InnoDB: File operation call: 'read'
  returned OS error 105.
  2013-11-21 08:47:26 802808c00  InnoDB: Cannot continue operation.
 
  I followed that link but it doesn't tell me anything outside of what
  is above. Can I fix this?

 i would look in the *system logs* because this pretty sure comes
 from the underlying operating system and is *not* mysql specific
 which is also in the message statet with returned OS error 105


 http://lxr.free-electrons.com/source/include/uapi/asm-generic/errno-base.h#L8


 Looks like a broken disk or FS corruption :-(

 Good luck!
 Manuel.



-- 
Paul Halliday
http://www.pintumbler.org/

-- 
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/mysql



Re: InnoDB error 5

2013-11-21 Thread Nick Cameo
What is the best way to backup your database. Which are the files that
I need to store on a usb disk

-- 
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/mysql



Re: InnoDB error 5

2013-11-21 Thread Shawn Green

Hello Nick,

On 11/21/2013 10:32 AM, Nick Cameo wrote:

OOoopppsss! I do mean for recovery/continual backup. I will do it
manually, but basically get all the data on a USB disk and be able to
recover/move it (the data) on another machine, the same machine etc..

I hope I did not just open up a can of worms. We just went live and
this post gave me a rude awakening. What is an effective easy to
follow protocol for backup and recovery in mysql!

Nick from Toronto



There are two basic types of backups, logical and physical.

Logical backups are performed by a utility that converts your database 
objects into their CREATE ... commands and exports your data as INSERT 
... commands (or as delimited files). These kinds of backups are quite 
portable and compress well. An example of such a tool is mysqldump.


http://dev.mysql.com/doc/refman/5.6/en/mysqldump.html

Physical backups can happen many different ways.  The easiest version to 
make/restore is the 'cold copy'.  This is exactly what it sounds like. 
Shutdown your mysqld and make a copy of everything. At the absolute 
minimum you need the ibdata files, the ib_log files, and all folders 
inside your --datadir location.


Warm or hot copies are provided by tools that coordinate with the server 
to synchronize the state of the InnoDB data to the moment the non-InnoDB 
data has been captured. One example of this is MySQL Enterprise Backup.

http://dev.mysql.com/doc/mysql-enterprise-backup/3.9/en/index.html

Additional details abound in the manual:
http://dev.mysql.com/doc/refman/5.6/en/backup-types.html


Regards,
--
Shawn Green
MySQL Senior Principal Technical Support Engineer
Oracle USA, Inc. - Hardware and Software, Engineered to Work Together.
Office: Blountville, TN

--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/mysql



Re: InnoDB error 5

2013-11-21 Thread Reindl Harald


Am 21.11.2013 18:59, schrieb Paul Halliday:
 It was indeed corruption :/ what a day. I was able to move everything
 over to another partition and have managed to get mysql up and running
 again.  There was a single file I could not, an .idb (the ,.frm is
 there). Is it possible to fix this from ibdata or the logs?

no - that's what backups are for
lesson learned the hard way

for production you have usually a replication-slave in the same
network which is regulary stopped and it's datadir rsynced to a
offsite-backup (one possible backup strategy) and so if one
server get a corrupt filesystem there is a just-in-time backup
while if things are going terrible wrong (power outage and the
slave is also corrupt you rsync back the slightly outdated
offsite backup

 On Thu, Nov 21, 2013 at 9:46 AM, Manuel Arostegui man...@tuenti.com wrote:
 2013/11/21 Reindl Harald h.rei...@thelounge.net

 Am 21.11.2013 13:51, schrieb Paul Halliday:
 Had a system crash this morning and I can't seem to get mysql back up
 and running. This is the error:

 InnoDB: Progress in percent: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17
 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40
 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63
 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86
 87 88 89 90 91 92 93 94 95 96 97 98 99 2013-11-21 08:47:26 1570
 [ERROR] InnoDB: Tried to read 16384 bytes at offset 589824. Was only
 able to read -1.
 2013-11-21 08:47:26 802808c00  InnoDB: Operating system error number 5
 in a file operation.
 InnoDB: Error number 5 means 'Input/output error'.
 InnoDB: Some operating system error numbers are described at
 InnoDB:
 http://dev.mysql.com/doc/refman/5.6/en/operating-system-error-codes.html
 2013-11-21 08:47:26 802808c00  InnoDB: File operation call: 'read'
 returned OS error 105.
 2013-11-21 08:47:26 802808c00  InnoDB: Cannot continue operation.

 I followed that link but it doesn't tell me anything outside of what
 is above. Can I fix this?

 i would look in the *system logs* because this pretty sure comes
 from the underlying operating system and is *not* mysql specific
 which is also in the message statet with returned OS error 105

 http://lxr.free-electrons.com/source/include/uapi/asm-generic/errno-base.h#L8


 Looks like a broken disk or FS corruption :-(



signature.asc
Description: OpenPGP digital signature


Re: InnoDB error 5

2013-11-21 Thread Nick Cameo
OOoopppsss! I do mean for recovery/continual backup. I will do it
manually, but basically get all the data on a USB disk and be able to
recover/move it (the data) on another machine, the same machine etc..

I hope I did not just open up a can of worms. We just went live and
this post gave me a rude awakening. What is an effective easy to
follow protocol for backup and recovery in mysql!

Nick from Toronto

-- 
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/mysql



Re: InnoDB error 5

2013-11-21 Thread Reindl Harald

Am 21.11.2013 13:51, schrieb Paul Halliday:
 Had a system crash this morning and I can't seem to get mysql back up
 and running. This is the error:
 
 InnoDB: Progress in percent: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17
 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40
 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63
 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86
 87 88 89 90 91 92 93 94 95 96 97 98 99 2013-11-21 08:47:26 1570
 [ERROR] InnoDB: Tried to read 16384 bytes at offset 589824. Was only
 able to read -1.
 2013-11-21 08:47:26 802808c00  InnoDB: Operating system error number 5
 in a file operation.
 InnoDB: Error number 5 means 'Input/output error'.
 InnoDB: Some operating system error numbers are described at
 InnoDB: 
 http://dev.mysql.com/doc/refman/5.6/en/operating-system-error-codes.html
 2013-11-21 08:47:26 802808c00  InnoDB: File operation call: 'read'
 returned OS error 105.
 2013-11-21 08:47:26 802808c00  InnoDB: Cannot continue operation.
 
 I followed that link but it doesn't tell me anything outside of what
 is above. Can I fix this?

i would look in the *system logs* because this pretty sure comes
from the underlying operating system and is *not* mysql specific
which is also in the message statet with returned OS error 105

http://lxr.free-electrons.com/source/include/uapi/asm-generic/errno-base.h#L8



signature.asc
Description: OpenPGP digital signature


ERROR : client option 'secure_auth' enabled

2013-09-16 Thread Pothanaboyina Trimurthy
Hi guys,
 today i have installed mysql 5.6.13 tar binary distribution,
on redhat5 machine. i have started the server with skip-secure-auth,
server started successfully.
when i am trying to shutdown the server, it throwing the following error,
can any one please let me know why it is happening.

/mysql5613/bin/mysqladmin: connect to server at 'localhost' failed
error: 'Connection using old (pre-4.1.1) authentication protocol refused
(client option 'secure_auth' enabled)'

Thanks in Advance...
-- 
Thanks  Kind Regards
P.Trimurthy
Mobile : +91 97397 64298


Re: ERROR : client option 'secure_auth' enabled

2013-09-16 Thread Reindl Harald


Am 16.09.2013 12:14, schrieb Pothanaboyina Trimurthy:
 Hi guys,
  today i have installed mysql 5.6.13 tar binary distribution,
 on redhat5 machine. i have started the server with skip-secure-auth,
 server started successfully.
 when i am trying to shutdown the server, it throwing the following error,
 can any one please let me know why it is happening.
 
 /mysql5613/bin/mysqladmin: connect to server at 'localhost' failed
 error: 'Connection using old (pre-4.1.1) authentication protocol refused
 (client option 'secure_auth' enabled)'

try a [mysqladmin] section in my.cnf



signature.asc
Description: OpenPGP digital signature


Re: ERROR : client option 'secure_auth' enabled

2013-09-16 Thread Pothanaboyina Trimurthy
Hi Reindl Harald,
i have included [mysqladmin] section in config file also. but still facing
same issue.


On Mon, Sep 16, 2013 at 3:54 PM, Reindl Harald h.rei...@thelounge.netwrote:



 Am 16.09.2013 12:14, schrieb Pothanaboyina Trimurthy:
  Hi guys,
   today i have installed mysql 5.6.13 tar binary distribution,
  on redhat5 machine. i have started the server with skip-secure-auth,
  server started successfully.
  when i am trying to shutdown the server, it throwing the following error,
  can any one please let me know why it is happening.
 
  /mysql5613/bin/mysqladmin: connect to server at 'localhost' failed
  error: 'Connection using old (pre-4.1.1) authentication protocol refused
  (client option 'secure_auth' enabled)'

 try a [mysqladmin] section in my.cnf




-- 
Thanks  Kind Regards
P.Trimurthy
Mobile : +91 97397 64298


Why ERROR 2003 (HY000): Can't connect to MySQL server on '192.168.27.72' (111)?

2013-06-13 Thread lx
hi all:
  I'm a new one. I have a mysql server in 192.168.27.72 , and a mysql
client in 192.168.23.73.
I use this way:
 mysql -h 192.168.27.72 -u root -p

the ERROR message is:
ERROR 2003 (HY000): Can't connect to MySQL server on '192.168.27.72' (111)

#
mysql select host, user, password from user;
+-+--+---+
| host| user | password
 |
+-+--+---+
| localhost   | root | 023c30696e164488
 |
| vps192168027072 | root |
  |
| 127.0.0.1   | root |
  |
| localhost   |  |
  |
| vps192168027072 |  |
  |
| localhost   | monty| 0fc756bc026507b2
 |
| %   | monty| 0fc756bc026507b2
 |
| localhost   | gdnscenter   | 184a22a73852ad5b
 |
| %   | gdns_replication | 2dbc2f8719c4ffcd
 |
| %   | root | 023c30696e164488
 |
| 192.168.23.73   | root |
*EAB821151A3DE1A8FA76CD28D8F3BBD2389751F6 |
| 0.0.0.0 | root |
*EAB821151A3DE1A8FA76CD28D8F3BBD2389751F6 |
+-+--+---+
12 rows in set (0.00 sec)
#

And in 192.168.27.72
#
service iptables status
Firewall is stopped.
#

and there are not bind-address  and skip_networking in my.cnf 。


I have installed the mysql in this way:
#
yum -y install mysql-server

#vim /etc/my.cnf
[mysqld]
datadir=/var/lib/mysql
socket=/var/lib/mysql/mysql.sock
# Default to using old password format for compatibility with mysql 3.x
# clients (those using the mysqlclient10 compatibility package).
old_passwords=1
default-character-set = utf8


[mysql]
default-character-set = utf8


[root@sample ~]# chkconfig mysqld on
[root@sample ~]# chkconfig --list mysqld
mysqld 0:off 1:off 2:on 3:on 4:on 5:on 6:off


chattr -i /etc/group
chattr -i /etc/passwd
chattr -i /etc/shadow
chattr -i /etc/gshadow
useradd mysql
chattr +i /etc/group
chattr +i /etc/passwd
chattr +i /etc/shadow
chattr +i /etc/gshadow


chown mysql /var/run/mysqld/

cd /var/lib/mysql
chown mysql -R *
cd �C


mysql_install_db --user=mysql --ldata=/var/lib/mysql


[root@sample ~]# /etc/rc.d/init.d/mysqld start

#


Thank you


Re: Why ERROR 2003 (HY000): Can't connect to MySQL server on '192.168.27.72' (111)?

2013-06-13 Thread Johan De Meersman
Assuming Linux, check where it's listening using netstat -lptn.

lx lxlenovos...@gmail.com wrote:
hi all:
I'm a new one. I have a mysql server in 192.168.27.72 , and a mysql
client in 192.168.23.73.
I use this way:
 mysql -h 192.168.27.72 -u root -p

the ERROR message is:
ERROR 2003 (HY000): Can't connect to MySQL server on '192.168.27.72'
(111)

#
mysql select host, user, password from user;
+-+--+---+
| host| user | password
 |
+-+--+---+
| localhost   | root | 023c30696e164488
 |
| vps192168027072 | root |
  |
| 127.0.0.1   | root |
  |
| localhost   |  |
  |
| vps192168027072 |  |
  |
| localhost   | monty| 0fc756bc026507b2
 |
| %   | monty| 0fc756bc026507b2
 |
| localhost   | gdnscenter   | 184a22a73852ad5b
 |
| %   | gdns_replication | 2dbc2f8719c4ffcd
 |
| %   | root | 023c30696e164488
 |
| 192.168.23.73   | root |
*EAB821151A3DE1A8FA76CD28D8F3BBD2389751F6 |
| 0.0.0.0 | root |
*EAB821151A3DE1A8FA76CD28D8F3BBD2389751F6 |
+-+--+---+
12 rows in set (0.00 sec)
#

And in 192.168.27.72
#
service iptables status
Firewall is stopped.
#

and there are not bind-address  and skip_networking in my.cnf 。


I have installed the mysql in this way:
#
yum -y install mysql-server

#vim /etc/my.cnf
[mysqld]
datadir=/var/lib/mysql
socket=/var/lib/mysql/mysql.sock
# Default to using old password format for compatibility with mysql 3.x
# clients (those using the mysqlclient10 compatibility package).
old_passwords=1
default-character-set = utf8


[mysql]
default-character-set = utf8


[root@sample ~]# chkconfig mysqld on
[root@sample ~]# chkconfig --list mysqld
mysqld 0:off 1:off 2:on 3:on 4:on 5:on 6:off


chattr -i /etc/group
chattr -i /etc/passwd
chattr -i /etc/shadow
chattr -i /etc/gshadow
useradd mysql
chattr +i /etc/group
chattr +i /etc/passwd
chattr +i /etc/shadow
chattr +i /etc/gshadow


chown mysql /var/run/mysqld/

cd /var/lib/mysql
chown mysql -R *
cd –


mysql_install_db --user=mysql --ldata=/var/lib/mysql


[root@sample ~]# /etc/rc.d/init.d/mysqld start

#


Thank you

-- 
Sent from Kaiten Mail. Please excuse my brevity.

ERROR 1005 (HY000): Can't create table 'user_database.user_table' (errno: 157)

2013-04-15 Thread Sai Kumar Ganji
Hello Guys,

I am trying to setup a mysql-cluster with two data nodes and one management
node.

The sequence of step I followed are:

Ran *'ndb_mgmd'  *on management node
Ran '*ndbd --initial' *on both the data nodes
Ran '*mysqld' *on both the data nodes


Then the status of the cluster on management node is:

[ndbd(NDB)]2 node(s)
id=2@10.252.151. http://10.252.151.67/xx  (Version: 5.1.68,
Nodegroup: 0, Master)
id=3@10.253.4. http://10.253.4.143/xx  (Version: 5.1.68,
Nodegroup: 0)

[ndb_mgmd(MGM)]1 node(s)
id=1@10.253.19. http://10.253.19.149/xx  (Version: 5.1.68)

[mysqld(API)]2 node(s)
id=4@10.253.4. http://10.253.4.143/xx  (Version: 5.1.68)
id=5@10.252.151. http://10.252.151.67/xx  (Version: 5.1.68)

Then I tried to create the following 'user_table' on 'user_database':

create table user_table(
  ycsb_key varchar(32) primary key,
  field1 varchar(100), field2 varchar(100), field3 varchar(100), field4
varchar(100),
  field5 varchar(100), field6 varchar(100), field7 varchar(100), field8
varchar(100),
  field9 varchar(100), field10 varchar(100))
  max_rows=1000 engine=ndbcluster partition by key(ycsb_key);


I get this  error:

*ERROR 1005 (HY000): Can't create table 'user_database.user_table' (errno:
157)*

Can you guys please help me in this .


And when I ran *mysql show engines; *I get this
*
*

++-+---+--+--++
| Engine | Support | Comment
| Transactions | XA   | Savepoints |
++-+---+--+--++
| ndbcluster | DEFAULT | Clustered, fault-tolerant tables
   | YES  | NO   | NO |
| MRG_MYISAM | YES | Collection of identical MyISAM tables
| NO   | NO   | NO |
| CSV| YES | CSV storage engine
   | NO   | NO   | NO |
| MyISAM | YES | Default engine as of MySQL 3.23 with great
performance| NO   | NO   | NO |
| MEMORY | YES | Hash based, stored in memory, useful for temporary
tables | NO   | NO   | NO |
++-+---+--+--++

-- 
Thanks  Regards

Venkata Sai Ganji
Graduate Student
Dept of Computer Science
Montana State University - Bzn


Re: error-log aging

2013-04-15 Thread hsv
 2013/04/05 11:16 +0200, Johan De Meersman 
Half and half - rename the file, then issue flush logs in mysql to close and 
reopen the logs, which will cause a new log with the configured name to be 
created.

That being said, I'm not much aware of Windows' idiosyncracies - I hope the 
damn thing allows you to rename a file that's being held open by a program. If 
not, well... see above. 

No, as Reindl answered, but in 5.5.8 there is this:


If you flush the logs using 
file:///C:/Program%20Files/MySQL/MySQL%20Server%205.5/HELP/sql-syntax.html#flushFLUSH
 LOGS or 
file:///C:/Program%20Files/MySQL/MySQL%20Server%205.5/HELP/programs.html#mysqladminmysqladmin
 flush-logs and 
file:///C:/Program%20Files/MySQL/MySQL%20Server%205.5/HELP/programs.html#mysqldmysqld
 is writing the error log to a file (for example, if it was started with the 
file:///C:/Program%20Files/MySQL/MySQL%20Server%205.5/HELP/server-administration.html#option_mysqld_log-error--log-error
 option), the effect is version dependent: 
* As of MySQL 5.5.7, the server closes and reopens the log file. To rename 
the file, you can do so manually before flushing. Then flushing the logs 
reopens a new file with the original file name. For example, you can rename the 
file and create a new one using the following commands: shell mv host_name.err 
host_name.err-old

shell mysqladmin flush-logs

shell mv host_name.err-old backup-directory

On Windows, use rename rather than mv. 

* Prior to MySQL 5.5.7, the server renames the current log file with the 
suffix -old, then creates a new empty log file. Be aware that a second 
log-flushing operation thus causes the original error log file to be lost 
unless you save it under a different name. On Windows, you cannot rename the 
error log while the server has it open before MySQL 5.5.7. To avoid a restart, 
flush the logs first to cause the server to rename the original file and create 
a new one, then save the renamed file. That also works on Unix, or you can use 
the commands shown earlier. 


-- 
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/mysql



Re: error-log aging

2013-04-05 Thread Johan De Meersman
- Original Message -
 From: h...@tbbs.net
 Subject: Re: error-log aging
 
 man logrotate
 
 Not Unix!

So get unix :-)

 In any case, I take this to mean that this is not done within MySQL,
 right?

Half and half - rename the file, then issue flush logs in mysql to close and 
reopen the logs, which will cause a new log with the configured name to be 
created.

That being said, I'm not much aware of Windows' idiosyncracies - I hope the 
damn thing allows you to rename a file that's being held open by a program. If 
not, well... see above.

-- 
Linux Kriek Wanderung
April 19-21, 2013
http://www.tuxera.be/lkw

-- 
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/mysql



Re: error-log aging

2013-04-05 Thread Reindl Harald


Am 05.04.2013 11:16, schrieb Johan De Meersman:
 - Original Message -
 From: h...@tbbs.net
 Subject: Re: error-log aging

 man logrotate
 
 Not Unix!
 
 So get unix :-)
 
 In any case, I take this to mean that this is not done within MySQL,
 right?
 
 Half and half - rename the file, then issue flush logs in mysql to close 
 and reopen the logs, which will cause a new log with the configured name to 
 be created.
 
 That being said, I'm not much aware of Windows' idiosyncracies - I hope the 
 damn thing allows you to rename a file that's being held open by a program. 
 If not, well... see above.

no, windows does not allow this

but what also will work without touch mysqld is copy the existing file and 
empty it
on Unix  /path/mysqld.log would do this, on windows maybe redirect echo of a 
empty
string to the file, at least whatever  /path/file.ext works on windows too

i am working this way since years with apache accesslogs to empty them at the
begin of each month EXACTLY after webalizer has proceeded the accesslog from
the specific vhost which is all controlled by a bash-script generated by a
PHP script with access to the config-data :-)



signature.asc
Description: OpenPGP digital signature


Re: error-log aging

2013-04-05 Thread Reindl Harald


Am 04.04.2013 23:08, schrieb h...@tbbs.net:
 Is there somewhere within MySQL means of aging the error log, that it not 
 indefinitly grow big, or is that done through the OS and filesystem on which 
 mysqld runs?

man logrotate



signature.asc
Description: OpenPGP digital signature


error-log aging

2013-04-04 Thread hsv
Is there somewhere within MySQL means of aging the error log, that it not 
indefinitly grow big, or is that done through the OS and filesystem on which 
mysqld runs?


-- 
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/mysql



  1   2   3   4   5   6   7   8   9   10   >