Hello.


What 'SHOW WARNINGS' reports?





Elizabeth Bonifacio <[EMAIL PROTECTED]> wrote:

> Dear Gleb,

> 

> Thanks, i will try that as well, so far my program can access the

> server now by using the old password. Now my problem is when i load

> file, its only reading the first line and some more insert a null

> record before the ist record.

> 

> here is the result i get after loading the text file:

> mysql> load data local infile 'syslog5.txt' into table log4 fields

> terminated by ' \t' lines terminated by '\n';

> Query OK, 2 rows affected, 513 warnings (0.03 sec)

> Records: 20  Deleted: 0  Skipped: 18  Warnings: 505

> 

> the first record shows all null values on all columns

> the second record is correct but it is the first line in my text file

> the rest of the lines in the text file is ignored.

> 

> I tried creating a table for my pc event logs, its all working fine,

> can load, and query from the c application.

> 

> Would appreciate if you guys can help.

> 

> Elizabeth

> 

> 

> 

> On 6/23/05, Gleb Paharenko <[EMAIL PROTECTED]> wrote:

>> Hello.

>>=20

>>=20

>>=20

>> I've compiled your code using libraries and includes from

>>=20

>> MySQL-4.1.6 (yes, my testing environment isn'tperfect :) and

>>=20

>> successfully connected to MySQL-4.1.10. Old passwords was off,

>>=20

>> so I used a 4.1. authorization protocol.

>>=20

>>=20

>>=20

>>=20

>>=20

>> Elizabeth Bonifacio <[EMAIL PROTECTED]> wrote:

>>=20

>> > Dear All,

>>=20

>> >

>>=20

>> > I'm new into mysql and has been encountering huge problem in

>>=20

>> > connecting to the database from the c application. The code execute

>>=20

>> > with an error message :

>>=20

>> > Failed to connect to database: Error:

>>=20

>> > Client does not support authentication protocol requested by server;

>>=20

>> > consider upgrading MySQL client

>>=20

>> > Is this a bug?

>>=20

>> >

>>=20

>> > I'm running the MySql server version 4.1 with server and client both

>>=20

>> > on same computer running on windows XP.

>>=20

>> >

>>=20

>> > I have no problem connecting to the server using root with a windfall

>>=20

>> > password but  I cannot connect from the c application below.

>>=20

>> >

>>=20

>> > I have only one user in the server (root,windfall) and has been

>>=20

>> > successful in accessing mysql from the client side except when

>>=20

>> > connecting from a c application.

>>=20

>> >

>>=20

>> > here is the application which I compile using Visual C++ compiler:

>>=20

>> >

>>=20

>> > #include "stdio.h "

>>=20

>> > #include "winsock.h"

>>=20

>> > #include "iostream.h "

>>=20

>> >

>>=20

>> > #include "mysql.h"

>>=20

>> >

>>=20

>> > int main()

>>=20

>> > {

>>=20

>> >

>>=20

>> > MYSQL mysql;

>>=20

>> > MYSQL_ROW row;

>>=20

>> > MYSQL_RES *result;

>>=20

>> >

>>=20

>> > unsigned int num_fields;

>>=20

>> > unsigned int i;

>>=20

>> > int num =3D3D 0;

>>=20

>> > int iRetValue =3D3D 0;

>>=20

>> >

>>=20

>> > mysql_init(&mysql);

>>=20

>> > //printf("%s",&mysql );

>>=20

>> >

>>=20

>> > if (!mysql_real_connect(&mysql,"localhost","root","windfall","mysql",33=

> 06,

>>=20

>> > NULL,0))

>>=20

>> > {

>>=20

>> > fprintf(stderr, "Failed to connect to database: Error: \n%s\n",

>>=20

>> > mysql_error(&mysql));

>>=20

>> > }

>>=20

>> > else

>>=20

>> > {

>>=20

>> > printf("SUCCESS\n");

>>=20

>> > iRetValue =3D3D mysql_query(&mysql, "SELECT * FROM user");

>>=20

>> >

>>=20

>> > if( iRetValue !=3D3D 0 )

>>=20

>> > {

>>=20

>> > printf("Query Not Executed Properly.Please Check The Syntax.\n");

>>=20

>> > }

>>=20

>> > //here goes the error message :o)

>>=20

>> > else

>>=20

>> > {

>>=20

>> > result =3D3D mysql_store_result(&mysql);

>>=20

>> >

>>=20

>> > num =3D3D mysql_field_count(&mysql);

>>=20

>> > printf("Number Of Rows :%d\n",num );

>>=20

>> >

>>=20

>> > num_fields =3D3D mysql_num_fields( result);

>>=20

>> > printf("Number Of Coloumns :%d\n",num_fields );

>>=20

>> >

>>=20

>> > while ((row =3D3D mysql_fetch_row(result)))

>>=20

>> > {

>>=20

>> > unsigned long *lengths;

>>=20

>> > lengths =3D3D mysql_fetch_lengths(result);

>>=20

>> >

>>=20

>> > for(i =3D3D 0; i < num_fields; i++)

>>=20

>> > {

>>=20

>> > printf("[%.*s] \t", (int) lengths[i], row[i] ? row[i] : "NULL");

>>=20

>> > }

>>=20

>> > printf("\n");

>>=20

>> > }

>>=20

>> > }

>>=20

>> > }

>>=20

>> > }

>>=20

>> >

>>=20

>> > I would appreciate if you guys can help. thanks.

>>=20

>> >

>>=20

>> > Elizabeth

>>=20

>> >

>>=20

>>=20

>>=20

>> --

>> For technical support contracts, goto https://order.mysql.com/?ref=3Densi=

> ta

>> This email is sponsored by Ensita.NET http://www.ensita.net/

>>   __  ___     ___ ____  __

>>  /  |/  /_ __/ __/ __ \/ /    Gleb Paharenko

>>  / /|_/ / // /\ \/ /_/ / /__   [EMAIL PROTECTED]

>> /_/  /_/\_, /___/\___\_\___/   MySQL AB / Ensita.NET

>>       <___/   www.mysql.com

>>=20

>>=20

>>=20

>>=20

>> --

>> MySQL General Mailing List

>> For list archives: http://lists.mysql.com/mysql

>> To unsubscribe:    http://lists.mysql.com/[EMAIL PROTECTED]

> m

>>=20

>>

> 



-- 
For technical support contracts, goto https://order.mysql.com/?ref=ensita
This email is sponsored by Ensita.NET http://www.ensita.net/
   __  ___     ___ ____  __
  /  |/  /_ __/ __/ __ \/ /    Gleb Paharenko
 / /|_/ / // /\ \/ /_/ / /__   [EMAIL PROTECTED]
/_/  /_/\_, /___/\___\_\___/   MySQL AB / Ensita.NET
       <___/   www.mysql.com




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

Reply via email to