I'm trying to get ODBC to work on MAMP. I have tried many suggestions and solutions including those already on stackoverflow:
MAMP: Adding ODBC or SQL Server support ,
How do I add an ODBC driver to a MAMP environment?
None are successful so far.
This is the latest I tried.
I downloaded the latest ODBC connector:
http://dev.mysql.com/downloads/connector/odbc/
Installed it with the OSX DMG
I than added the driver in iODBC
I keep getting this message:
Specific driver could not be loaded
and
No suitable image found. Did find: /usr/local/lib/libmyodbc5w.so mach-o, but wrong architecture
Any suggestions?
Looks like you are right about the 32-bit only of iODBC.
You will need to download the Source, and compile from scratch. You will also need to download XCode through the AppStore first, so you have access to gcc and cmake.
Source Code Link: http://www.iodbc.org/downloads/iODBC/libiodbc-3.52.7.tar.gz
Note: From the CLI you can run the lipo -detailed_info /path/to/binary command. This would give you detailed information about a specified binary.
I struggled with this problem for MANY hours (I messed with msql/php, and for years ago, so I consider myself currently a total newbie!). My problem was I couldn't connect my PC to my new online server using ODBC (server was a mac mini running mavericks, trying to connect from a windows machine in my office via mysql odic connector). I finally found a solution that works. here is my situation and environment:
I am converting from Access to MySql/PHP. Application configured as front-end / back-end.
Put my server online so I could export my access back end tables to MYSQL. (some were online at another server, some were on my internal windows 2003 server. ) planning to change front end to php from access vba.
Installed ODBC Administrator on mac mini (mavericks) per google searches.
Went to drivers tab in ODBC Administrator. Set my drivers from USER to SYSTEM in the pulldown on the drivers page. This opened the drivers to appear on the SYSTEM tab of ODBC Administrator (prior to this, the drivers did not appear on the SYSTEM tab of ODBC Administrator).
Added the DSN, the USER, the PORT, and the PASSWORD variables.
I then went to my MAMP application that was running on the Mac. I clicked on [FILE], [EDIT] [TEMPLATE] [my.cnf]. This opened the configuration file. There is a warning - if this gets polluted, it screws up the entire MAMP app.
I made the following change (Inserted a comment above the change).
the bind address was just commented out. 9-5-14
bind-address = 127.0.0.1
This change does not tie MAMP to the localhost (I believe).
I kept scrolling through the file. I also made the next change, and then saved the .cnf file:
Just commented out the next line. Trying to get odbc to work. 9-5-14
MAMP_skip-networking_MAMP
This change I believe tells MAMP to allow remote connections.
On PC, under Data Sources, System DSN tab, using MYSQL ODBC 5.1 driver, I set the datasource name, I set the URL of the online server (which was registered with internic), I set the port, and I entered the User and password to be the same KEYS I set in the ODBC System DSN I added on the Mac server. Then, I pulled down the database tab, and miraculously - the databases in my mac server appeared!
Hope this is helpful to another newbie! I literally worked WAY too many hours trying to find a solution, and it wound up being pretty easy once I lucked into the answer!
.
Related
I am facing a problem pretty common, I have installed MySql Server because in the past I developed an CRUD app by using Java Swing and Maven, and now I am trying to create same thing, a CRUD app only this time with PHP.
I am following a tutorial from Udemy and this guy is using XAMPP to launch both an Apache Server and a MySQL. But somehow it's interfering with the one already installed on my laptop and cannot make the connection with XAMPP.
I opened my.ini and where says password i put my own from MySQL Workbench, and I see it's using the same port 3306 but still cannot work and I dont know why.
Is there any solution to modify my.ini and establish the connection without uninstalling the MySql Server installed before, because if I do that I ruin the other Java app using it.
Could you please provide the error logs? So the problem can be identified properly. By default, you can get the logs file for Apache in
\xampp\apache\logs\error.log
And for PHP here \xampp\php\logs
I have created a local project that connects to a SQL2012 database. On my local machine I have Windows 7 64Bit enterprise, with MS SQL drivers with no problem at all. I moved the project over to a Windows Server 2012R2 production machine. I got the web server up and PHP working fine.
I checked the phpinfo() file and sql drivers are enabled and sqlsrv is a 'registered stream'
I have try & catch blocks for all my connections to the database. No errors
I have checked the Apache error logs and there is no indication of a problem connecting to the DB.
My project uses SQL authentication, using a Username and Password - not built in Windows Authentication. I tried to change the password to a incorrect one ---> still no error?!!
I even tried to disable Domain, Public, and Private Window Firewalls. Still nothing.
I'm totally stumped, perhaps someone here may have some ideas.
Does anyone know if the SQLSRV30 pack is compatible with Windows 2012R2?
OK I have figured out what the problem was, I needed to install Microsoft® SQL Server® 2012 Native Client located at: http://www.microsoft.com/en-us/download/confirmation.aspx?id=29065#
After that installed everything is working fine.
I have my Windows 7 desktop computer, and created php application which uses mysql database. I tried to run that after creating environment in my desktop with the help of XAMPP. It worked perfectly without any problem. I tested that same application in WAMP and it worked perfectly there also.
However, at the time of deployment to the Windows R2 2008 server, I used IIS to get the application run. Following is the description of firmware installed:
Installed mysql and mysql workbench
Installed IIS using Control panel-> add remove program-> turn on windows feature on off -> iis
Installed php 5.3 version using Microsoft Web platform installer (Web PI).
Activated FastCGI with the help of following link: on-iis#InstallPHP
Updated necessary changed in php.ini file. Activated port 3306 for mysql and port 80 for localhost.
Checked localhost and phpinfo.php file and both work fine.
Deployed application, and tried to run using localhost and 127.0.0.1 as well as from local IP address and it executed the first login page perfectly.
Everything works perfectly. However, I open the entry form in the application, and tried to fill up the form, and when clicked on submit, the data are not getting saved in database.
As a test, I checked by importing the old database and while searching the data in other application page, I am able to see the data coming from the database. But problem only happens when I do any insert any entry or try to submit data, I can't get the data saved in database.
This same thing works perfectly in WAMP and XAMPP however, does not work on IIS environment.
The MySQL user being used to interact with the database may not have the INSERT Grant for that database. WAMP and XAMPP are both using a mysql user with defined privileges. Have you created the same user with the same privileges on the newly created MySQL instance on your Windows 2008 server? You may consider reading over the MySQL Grant syntax. Utilizing mysql_error() for error trapping could prove useful for troubleshooting as well.
i'm new to use moodle. i'm currently used moodle version 2.5 in iis 8 on local machine windows 8 with sql server 2012 express edition as database server.
what i wanted to know is how to install native mssql? and can we use native mssql to connect it with sql server 2012 express edition on windows 8?
i got this error while install moodle :
Error: database driver problem detected
The site administrator should verify server configuration
PHP has not been properly configured with the MSSQL extension so that it can communicate with SQL*Server. Please check your php.ini file or recompile PHP.
what should i do? thanks
in this article :
How to get mssql work with PHP 5.3?
i found : The MSSQL extension is not available anymore on Windows with PHP 5.3 or later. SQLSRV, an alternative driver for MS SQL is available from Microsoft: » http://msdn.microsoft.com/en-us/sqlserver/ff657782.aspx.
so if i used moodle 2.5 (it need 5.4.x php version) so i can't use mssql? is that true?
thanks
and sorry for my English.
Have you read follow the instructions in the Moodle Website
Here it is:
Installation overview
1) Get MSSQL Server installed and running. (A free limited version, SQL Server Express Edition is available for testing.)
Make sure that you choose mixed authentication (Windows and local accounts) to keep things simpler later. You'll be asked to define the "sa" account password (it's the default System Administrator account which has full access to all databases by default).
2) Make sure MS SQL Server can accept incoming TCP/IP connections on port 1433 (the standard one).
You might need to explicitly allow this in your Windows firewall (see the Control Panel). You may also need to edit options in the :SQL Server Configuration Manager -> Network Configuration -> Protocols -> TCP/IP enabled
3) Open the "SQL Server Management Studio" and create a new empty database. If you are using the "sa" account then you don't need to do anything else here.
4) Configure these settings in your created (and still empty) database: Configure these settings in your created (and still empty) database:
Use a case sensitive collation, such as Latin1_General_CS_AS.
ANSI NULLS Enabled = true (ALTER DATABASE xxxx SET ANSI_NULLS ON)
Quoted Identifiers Enabled = true (ALTER DATABASE xxxx SET QUOTED_IDENTIFIER ON)
(Moodle 2.x only) Row Versioning Enabled (ALTER DATABASE xxxx SET READ_COMMITTED_SNAPSHOT ON)
This is not settable via the DB properties. To set READ_COMMITTED_SNAPSHOT, there must be no active connections to the database except for the connection executing the ALTER command. If you are viewing the DB in the Server Management Studio, disconnect from any servers in the "Object Explorer" (right-click > Disconnect), then create a "New Query" and run the ALTER command. See http://msdn.microsoft.com/en-us/library/bb522682.aspx for details.
If your DB name starts with a number, you may need to put quotes around the DB name in the query.
5) Get PHP installed with a web server. Unless you want to do it under IIS or some other way, the packages on the Moodle download page are a good solution.
6) Choose one of the following specific sections for your server to install the mssql extension alternative installed and running properly on your PHP box.
7) Set the following settings in your php.ini file
mssql.textlimit = 20971520
mssql.textsize = 20971520
8) With all this properly configured, you can continue with a standard Moodle installation.
Trying to integrate netbeans with mysql database management into the IDE as explained here.
I am running Ubuntu 11.1 on my local machine with phpMyAdmin.
I have set the usr name and password and the correct port number, but I can't seem to set the path to the phpmyadmin in the admin tab.
I have tried /usr/share/phpmyadmin/index.php as well as /etc/phpmyadmin .. both time I get a permission denied error and I am not entirely sure what file netbeans actually wants to work with.
Any Help would be truly appreciated.. Thanks in advance
You cant run phpmyadmin as a command line tool so the URI you need would be to the installation on the local webserver like http://localhost/phpmyadmin/index.php ... whatever URL you use to access it in a browser on your machine.
That said I dont know why you would use PHP My Admin when you could use MySQL Workbench or one of the other GNOME or KDE admin apps. They are all pretty much superior :-)