473,695 Members | 2,424 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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 2230
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_a rgs.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
4963
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 webserver runs that part of the script (see attached file, snippet.php), though, it doesn't go through. I don't get an error message or anything...it just returns a "1" (whereas it should return a "0") as far as I can tell. I have read the PHP...
4
1886
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 process did not report any errors.
0
1056
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, donations.genFund, donations.misFund, donations.benFund, donations.notes, oikos.id, oikos.famLabel FROM donations, oikos WHERE IF(xBatch = '', donations.batch > 0, donations.batch = xBatch) AND
1
3111
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, I installed an 800GB RAID5 array in the server and created a new file system on it and I attempted to move the datadir location to the new file system and that's when the problems started. Basically what I did was this - I shut down mysqld and...
4
15604
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 me to say "Access denied for user 'xxx'@'localhost' (using password: YES) when trying to connect". None the less, I'm absolutely full of confidence on my correct username and password, simply because if I do it this way: "bin/mysqldump --opt...
1
4053
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 system, when I do this and restart, attempting to connect to MySQL through PHP gives me this error Warning: mysql_connect() : Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (2) in
1
1341
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 would only access db1 and user2 would only access db2. However, now I want user1 to access both db1 & db2. I've used cPanel to declare user1 as a user of db2. However, whenever I try to access db2 from user1, I get permission problems.
11
3804
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 = mysql_query("select * from $tableInfo") ; for ($i = 0; $i < mysql_num_rows($result); $i++) {
1
3551
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 Administration and the Migration Toolkit) and I'm having trouble with it, I have decompressed the installer , I go to the installation directory (/usr/local/mysql/mysql-gui- tools-5.0) and type in ./mysql-query-browser to run the query
1
1418
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 )" mySql = mySql & " SELECT CLng(" & Me!PartWordsSavedHeadID & ") AS , mtb_PartWordsTemp.PartWordTemp" mySql = mySql & " FROM mtb_PartWordsTemp" mySql = mySql & " WHERE mtb_PartWordsTemp.PartWordsBox=" & PartBox & ";" ...
0
8642
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9002
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
7673
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, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
6500
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 presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5841
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4349
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
1
3021
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
2283
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
1984
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.