473,406 Members | 2,377 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,406 software developers and data experts.

Trouble with mysql-python 1.2.0 on Solaris 8 sparc

I need to be able to access mySQL 4.0 and 4.1 databases from python. I
was hoping to find mysql-python 1.2.0 already built for Sparc, but no
such luck. I've been struggling trying to get it build. First, I had
to hack setup.py because mysql_config --cflags was returning -m64,
which wasn't right because this is on a 32-bit processor. Then I got a
warning:

ld: warning: file /usr/local/mysql/lib/libmysqlclient_r.a(libmysql.o):
wrong ELF class: ELFCLASS64

No idea if this is causing my current problem.

Finally, I seemed to get the thing built and installed, but why I try
to import MySQLdb, I get the following:

File "/usr/local/lib/python2.3/site-packages/MySQLdb/__init__.py",
line 27, in ?
import _mysql
ImportError: ld.so.1: /usr/local/bin/python: fatal: relocation error:
file /usr/local/lib/python2.3/site-packages/_mysql.so: symbol
mysql_errno: referenced symbol not found

Any advice would be greatly appreciated.

Thanks,

Alec Wysoker

Jul 18 '05 #1
8 2215
Alec Wysoker wrote:
I need to be able to access mySQL 4.0 and 4.1 databases from python. I
was hoping to find mysql-python 1.2.0 already built for Sparc, but no
such luck.


Try version 1.0.1.
--
Michael Hoffman
Jul 18 '05 #2
Did you build your own MySQL, or did you use a pre-built version? And
what version? It's not clear if you're using 4.0 or 4.1. If
mysql_config is returning the wrong flags, then that's a bug with
MySQL.

You should be able to work around this by doing this in setup.py before
the call to setup():

extra_compile_args.remove('-m64')

Jul 18 '05 #3
Hi Andy,

Thanks for your message. It turned out that I had installed 64-bit
mySql on a 32-bit machine. I'm amazed it worked at all. Anyway, I
finally got mysql-python built, but I'm unable to connect to a machine
on a remote host. The problem doesn't seem to be with the python code,
because I'm unable to do it even with the mysql command-line client.
Sigh.

Jul 18 '05 #4
Alec Wysoker wrote:
Hi Andy,

Thanks for your message. It turned out that I had installed 64-bit
mySql on a 32-bit machine. I'm amazed it worked at all. Anyway, I
finally got mysql-python built, but I'm unable to connect to a machine
on a remote host. The problem doesn't seem to be with the python code,
because I'm unable to do it even with the mysql command-line client.
Sigh.

Could be you have a 4.2 server and an earlier client. Unbelievably,
MySQL changed its protocol while only incrementing the minor version
number, and this bit me in the ass when I wanted to move up to 4.1.

regards
Steve

Jul 18 '05 #5
Alec Wysoker wrote:
Hi Steve,

Thanks for the response. I don't think this is the problem. When I connect to the remote machine, it says this:

Your MySQL connection id is 58 to server version: 4.1.0-alpha-standard

When I connect to the local server, I get this:

Your MySQL connection id is 6 to server version: 4.1.10-standard

One would assume that 4.1.0 and 4.1.10 are compatible, no?

Indeed. Sorry I couldn't be of more assistance. I suspected that the
MySQLdb driver was somehow compiled with 4.0-or-earlier client software
- is this possible?

regards
Steve
--
Steve Holden +1 703 861 4237 +1 800 494 3119
Holden Web LLC http://www.holdenweb.com/
Python Web Programming http://pydish.holdenweb.com/

Jul 18 '05 #6
Do you mean the python glue code? I am having this problem when python is not in the picture at all, just running mysql command-line client. Presumably my client is 4.1.10, as it came in a built package along with the 4.1.10 server. In fact, the following seems to indicate that it is the right version:

/usr/local/mysql/bin/mysql --version
/usr/local/mysql/bin/mysql Ver 14.7 Distrib 4.1.10, for sun-solaris2.8 (sparc)
At 03:08 PM 2/24/2005, Steve Holden wrote:
Alec Wysoker wrote:
Hi Steve,
Thanks for the response. I don't think this is the problem. When I connect to the remote machine, it says this:
Your MySQL connection id is 58 to server version: 4.1.0-alpha-standard
When I connect to the local server, I get this:
Your MySQL connection id is 6 to server version: 4.1.10-standard
One would assume that 4.1.0 and 4.1.10 are compatible, no?

Indeed. Sorry I couldn't be of more assistance. I suspected that the MySQLdb driver was somehow compiled with 4.0-or-earlier client software - is this possible?

regards
Steve
--
Steve Holden +1 703 861 4237 +1 800 494 3119
Holden Web LLC http://www.holdenweb.com/
Python Web Programming http://pydish.holdenweb.com/

Jul 18 '05 #7
What happens when you try to connect? Be sure to check /etc/hosts.allow
and .deny on the server, if your server is compiled with TCP wrapper
support.

Jul 18 '05 #8
It seems unlikely that is the problem, since I can connect from the
client machine to server using JDBC, just not using mySQL client (any
by extension) mysql-python.

Jul 18 '05 #9

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

9
by: Penn Markham | last post by:
Hello all, I am writing a script where I need to use the system() function to call htpasswd. I can do this just fine on the command line...works great (see attached file, test.php). When my...
4
by: frankgerlach | last post by:
I am experiencing problems when installing PHP5/MYSQL. I did ./configure --with-mysql=/usr/local/mysql --disable-libxml --with-zlib-dir=/home/frank/zlib-1.2.2 make make install The build...
0
by: David McCowan | last post by:
Have a problem with this query, when xBatch is empty or at least seems to be empty. Using DWMX, MySQL, and PHP SELECT donations.id, donations.batch, donations.oikos_id, donations.giftDate,...
1
by: trt08010 | last post by:
I'm new to MySQL so hopefully this all makes sense. I'm running mysql-3.23.58-14 on Fedora Core 3 and everything installs and comes up correctly using default locations for everything. However,...
4
by: 21novembre | last post by:
Hi all, I got a quite strange problem when I tried to setup a database backup shell. I put it this way: "bin/mysqldump --opt --user=xxx --password=xxx DB > DB.bak" However, error 1045 came to...
1
by: laredotornado | last post by:
Hi, How do I change the place where the mysql socket file gets created? I thought it was in the my.cnf file by changing the "socket" property. However, using MySQL 5.0 on my Fedora Core 5 Linux...
1
by: David | last post by:
Hi All, I'm having trouble accessing multiple databases using a single user. Basically, I have 2 databases, db1 and db2 and 2 users, user1 and user2. Originally these were setup so that user1...
11
by: kennthompson | last post by:
Trouble passing mysql table name in php. If I use an existing table name already defined everything works fine as the following script illustrates. <?php function fms_get_info() { $result =...
1
by: =?iso-8859-1?B?RXJpYyBM83Bleg==?= | last post by:
Hello Guys! I just installed MySQL Community Server 5.0 onto my computer, which is running Red Hat 8.0 and it works fine, but I was trying to install the MySQL GUI Tools (Query Browser, MySQL...
1
by: AdamOnAccess | last post by:
I can't figure this out... I'm in Windows XP with Access 2007. I have this code in my form's class module... mySql = "INSERT INTO mtb_PartWordsSavedDetail ( PartWordsSavedHeadID, PartWords )"...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.