Perl MYSQL Error : libmysql.dll - mysql

Have you ever met this error when code Perl to access db MYSQL :
The procedure entry point mysql_get_parameters could not be located in libmysql_.dll ?
I already copied libmysql.dll from D:\xampp\mysql\lib\ to many places and renamed it to libmysql_.dll:
- D:\xampp\perl\vendor\lib\auto\DBD\mysql\
- C:\WINDOWS\System32\
But still Entry Point Not Found -.-'
Please help ...
Regards,
Christine

Download Strawberry Perl from http://strawberryperl.com/
Install it on your PC
Find libmysql_.dll file from C:\strawberry\c\bin
Copy it onto D:\xampp\perl\vendor\lib\auto\DBD\mysql

I know this is an OLD problem, but current strawberry perl (5.24.1.1) will not work as downloaded/installed unless you use the answer above to fix it.
Copy the dll located at [DRIVELETTER]:\Strawberry\c\bin\LIBMYSQL_.dll
TO: [DRIVELETTER]:\Strawberry\perl\vendor\lib\auto\DBD\mysql
And your legacy mysql scripts will work again :-) (well, mine did)

Copying
C:\strawberry\c\bin\libmysql_.dll
to
c:\strawberry\perl\vendor\lib\auto\mysql
does not work in Release Strawberry 5.28.2.
My solution is rather unusual - but works (until now):
I took the libmysql_.dll from Release Perl 5.12 from ActiveState (yes, sorry, but I was in despair)!!!
Copying this file (from 28th Sept 2016) to
c:\strawberry\perl\vendor\lib\auto\mysql did it for me.

Related

mediawiki move and upgrade at once

I'm considering to move one of the company internal wikis (very basic wiki with few/no extensions and not so many pages) to another machine and wondering if at the same time I can upgrade the mediawiki version, passing from 1.6 to the current latest 1.25 (in order to use extensions only available for the latest versions)
The Upgrade guide
https://www.mediawiki.org/wiki/Manual:Upgrading
seems to omit the scenario in which an upgrade of the underlying software (apache,mysql) is also required for setting up the target version.
and the Moving guide
https://www.mediawiki.org/wiki/Manual:Moving_a_wiki
strictly recommends that source and target wikis share the same software level.
So I'm a bit stuck. I would attempt an export/import of an xml dump, but I'm not confident for the above reason (there is a huge version gap in source and target wikis)
Or is there a better way to approach the problem? Thx
Edit after some tests
I consider Florian's answer the most safe and advisable, but I would share the final solution I came up with.
Install the new wiki (blank)
Export an xml dump of the original wiki
php maintenance\dumpBackup.php --full > dump.xml
I first encountered a "Cannot connect to database" error. So i had to add in the LocalSettings.php the lines
$wgDBadminuser=...
$wgDBadminpassword=...
Import the xml dump in the new wiki (first try in dry-run mode)
php maintenance\importDump.php --dry-run < dump.xml
php maintenance\importDump.php < dump.xml
Then I was prompted to run
php maintenance\rebuildrecentchanges.php
Copy the physical files from the old to the new wiki, in the same path(for common wikis they should be in the "images" folder. That was not my case).
Re-create the users (manually) in the new wiki
Last edited the LocalSettings.php with the most essential settings I wanted to preserve (groups, restrictions,...) .
And the moving was done! The new wiki is ok and already usable at this stage: pages are there, links are working..
In fact, it should work, if you move the wiki from one server to another and after that upgrade it on the new server. Like you may already know, it's important to backup all files and data you have for the wiki in the "old" environment, so you can easily restore it from there.
If I would want to do, what you want to do, I would first follow the "Moving a wiki" guide except the "Test" section. After that I would upgrade the wiki to the newest version. Now I can test the wiki intensively to see, if anything worked well.
If you don't want to do that, you really need to upgrade the wiki in the "old" source and move it after that. If I understand you correctly, that would require an update of the server software (I expect php and mysql?).

Code completion in Toad

I started developing in pl/sql recently. The IDE of choice is Taod. I quickly found out how to do codecompletion for tables, but I can't find a way to get code completion for variables.
I'm used to Textmate on the Mac where I simply write the beginning letters of a string and hit esc. The string is suplemented then with other strings from the same file which have the same beginning.
I was wondering if there is something like it in Taod, but I can't find it anywhere. I checked the checkbox next to Available Variables/Parameteres in Code Assist -> Toad Insight Objects but that didn't help.
Update: Toad Version 12.5.1.1. As pointed out in the first comment I did everything right, but it's actually a bug in this version of Toad.
That checkbox you tried is the way to go about it. There is a bug in Toad 12.5 (maybe earlier versions too) where it's not showing variables if they are defined in lowercase. If they are in uppercase it's OK. This is fixed in Toad 12.6 to be released soon.

oprofile on a stripped binary

I am trying to find ways to use oprofile on a stripped binary yet
still get detailed information when symbol tables are available
later, but so far I haven't find any solution.
Here is my situation: Our software is shipped to our customer stripped, but we have unstripped version on our build machine. When
we have a software crash, the backtrace can be sent back and we
can interpret it with local unstripped build.
Since oprofile is about taking samples and interpreting samples, is there a way to de-couple this process? Is there a way for oprofile/opreport to generate hex-address based profile information that can be interpretted on a different machine with all symbols available. Maybe I can do so by copying back the sample files?
I am sure it must be possible, so I am reaching out to the experts for advice. Detailed steps would be nice.
Thanks in advance.
I found a way to do it. It might not be the best, but I am surprised this didn't generate enough interest.
Say you have a binary called "mybin" and running its stripped version at customer site. Here would be my procedure:
Ask the customer (or your field engineer) run oprofile, the
whole nine yard (setup, start, dump and shutdown), then do:
tar czf OP-`date +"%Y%m%d%H%M%S"`.tgz /var/lib/oprofile
and ship that back.
On your build machine, do the following
mkdir /tmp/migrate && cd /tmp/migrate
tar xzf OP-*.tgz
Now you can check the overall CPU usage on target, by
opreport -% --session-dir=/tmp/migrate/var/lib/oprofile
If your "mybin" is built under /home/nobody/build/1.2.0/, you can use
opreport -l mybin --image-path /home/nobody/build/1.2.0/ --session-dir=/tmp/migrate/var/lib/oprofile
to see the details just for "mybin".

MySQL Connector/NET - support for transactions under Mono

Does anyone know how to get MySQL transactions working under Mono?
I'm using MySQL Connector/NET (via Subsonic 3) and it works perfectly under Microsoft .NET. Recently however I tried running the same site under Mono on Ubuntu and it almost works - except I can't seem to get transactions working.
Reading around the Mono/MySQL sites it's not exactly clear what is and isn't supported.
The original problem is a NotImplementedExcetion with call stack like this:
[System.NotImplementedException]: The requested feature is not implemented.
at MySql.Data.MySqlClient.MySqlConnection.EnlistTransaction (System.Transactions.Transaction) <0x00181>
at MySql.Data.MySqlClient.MySqlConnection.Open () <0x00381>
at SubSonic.DataProviders.DbDataProvider.CreateConnection (string) <0x00059>
at SubSonic.DataProviders.DbDataProvider.CreateConnection () <0x00015>
There's a few mentions of this on the MySQL site which seem to point to Mono not supporting the required infrastructure to make transactions work. There's also a comment that transactions work fine when using CommittableTransaction rather than TransactionScope. So I tried that, but got the same exception.
Another comment on the MySQL site suggested rebuilding the MySQL data provider with the MONO build option. Which I tried and the site now works, but transactions aren't being used - they've been simply disabled. Really?
I find it hard to believe that transactions can't be made to work in this environment, but can't find a working example.
Mono 2.6.7, MySQL Connection/NET 6.3.4, Subsonic 3, Ubuntu 10.10
Figured it out. It's TransactionScope that doesn't seem to work. Reverting back to DbConnection.BeginTransaction works fine. I've written up how to do it under Subsonic here: http://www.toptensoftware.com/blog/posts/18/using-transactions-with-mono-mysql-and-subsonic
I also had this problem with mono v.2.10.9 and mysqlconnector v. 6.6.5 and 6.7.2-Beta and I was unable to find a solution for this problem but now I figured it out.
First I took the sources of mysqlconnector and added them into my project folder. Thought it would work if I compile the connector directly with mono but it doesn't.
Then I stepped trough the code and I found that there are the following lines of code at line 530 in the file Connection.cs of the MySql.Data project:
#if !MONO && !CF && !RT
Console.WriteLine("### Should not be here... ###");
if (Transaction.Current != null && Settings.AutoEnlist)
EnlistTransaction(Transaction.Current);
#endif
The Console.WriteLine was added by me to try if it will also appear if I run my Application with mono and it appeared. So I commented this lines out and after that everything was working at this moment.
The real solution however should not be to comment out some lines of code.
For solving this you have to define the 'MONO' symbol.
If you are using MonoDevelop just right click on the project MySql.Data and select the compiler section. There you will find a textbox with the label 'define symbols' or something similar. Simply add the new symbol 'MONO' into this textbox.

Netbeans 6.1 Debugger stopped working with error com.sun.jdi.InternalException: Unexpected JDWP Error: 502

I have been using Netbeans 6.1 for a long time and my debugger has always been flawless. Somehow recently (within the last two weeks or so) my debugger stops at breakpoints but it either freezes most of the time or i can't find out the value of any variable, my local variables wont expand and my watches will sometimes show all nulls even for this.hashCode() or not even update at all and freeze.
When this happens i see the following netbeans exceptions
com.sun.jdi.InternalException: Unexpected JDWP Error: 502
at com.sun.tools.jdi.JDWPException.toJDIException(JDWPException.java:47)
at com.sun.tools.jdi.ObjectReferenceImpl.invokeMethod(ObjectReferenceImpl.java:379)
at org.netbeans.modules.debugger.jpda.expr.TreeEvaluator.invokeVirtual(TreeEvaluator.java:164)
at org.netbeans.modules.debugger.jpda.JPDADebuggerImpl.invokeMethod(JPDADebuggerImpl.java:844)
at org.netbeans.modules.debugger.jpda.models.AbstractObjectVariable.invokeMethod(AbstractObjectVariable.java:417)
at org.netbeans.modules.debugger.jpda.ui.models.JavaVariablesFilter.getChildren(JavaVariablesFilter.java:133)
at org.netbeans.modules.debugger.jpda.ui.models.VariablesTreeModelFilter.getChildren(VariablesTreeModelFilter.java:193)
at org.netbeans.spi.viewmodel.Models$CompoundTreeModel.getChildren(Models.java:628)
at org.netbeans.spi.viewmodel.Models$CompoundModel.getChildren(Models.java:2819)
at org.netbeans.modules.viewmodel.TreeModelNode$TreeModelChildren.evaluateLazily(TreeModelNode.java:701)
at org.netbeans.modules.viewmodel.TreeModelNode$LazyEvaluator.run(TreeModelNode.java:1124)
at org.openide.util.RequestProcessor$Task.run(RequestProcessor.java:561)
[catch] at org.openide.util.RequestProcessor$Processor.run(RequestProcessor.java:986)
com.sun.jdi.InternalException: Unexpected JDWP Error: 502
at com.sun.tools.jdi.JDWPException.toJDIException(JDWPException.java:47)
at com.sun.tools.jdi.ObjectReferenceImpl.invokeMethod(ObjectReferenceImpl.java:379)
at org.netbeans.modules.debugger.jpda.expr.TreeEvaluator.invokeVirtual(TreeEvaluator.java:164)
at org.netbeans.modules.debugger.jpda.JPDADebuggerImpl.invokeMethod(JPDADebuggerImpl.java:844)
at org.netbeans.modules.debugger.jpda.models.AbstractObjectVariable.getToStringValue(AbstractObjectVariable.java:315)
at org.netbeans.modules.debugger.jpda.models.AbstractObjectVariable.getToStringValue(AbstractObjectVariable.java:285)
at org.netbeans.modules.debugger.jpda.ui.models.VariablesNodeModel.getLimitedToString(VariablesNodeModel.java:316)
at org.netbeans.modules.debugger.jpda.ui.models.VariablesNodeModel.getShortDescriptionSynch(VariablesNodeModel.java:275)
at org.netbeans.modules.debugger.jpda.ui.models.VariablesNodeModel$1.run(VariablesNodeModel.java:233)
at org.openide.util.RequestProcessor$Task.run(RequestProcessor.java:561)
[catch] at org.openide.util.RequestProcessor$Processor.run(RequestProcessor.java:986)
Does anybody know how to fix or workaround this problem? I have googled this exception but can't find anything of value. The only thing i found is about running two different JVMs, one to debug and one to run the application (but this is not the case for me, both JVMs are the exact same version "1.4.2_03"). I am running into this issue at work so upgrading Java or my IDE is not an option, though it this was fixed in a newer version of the IDE i would still like to know that but most importantly I really need a fix or workaround for this. I have also not changed any settings in my project or NetBeans that i am aware of from the time my debugger was working to now.
Thanks
Append: I also got the following message
A com.sun.jdi.InternalException exception has occurred.
Please report this at http://www.netbeans.org/community/issues.html,
including a copy of your messages.log file as an attachment.
The messages.log file is located in your C:\Documents and Settings\default.netbeans\6.1\var\log folder.
And i have a copy of messages.log if anyone wants me to post it.
I also tried debugging with a different project that i haven't used in a while and it still failed in the same way.
I could really use some help on this one.
It's probably issue # 136461. If the software update(s) for 6.1 do not fix it, then you're probably out of luck. NB 6.1 is over 2 years old at this point.
I understand the desire to keep all developers on the same IDE release. A change to a .form file or a nbproject file can spoil an unwary developer's day.
However, can you install a personal copy of 6.9 and just use it for debugging? Keep the 6.1 around to verify everything before committing.