Announcement

Collapse
No announcement yet.

Trying to Setup MySQL database locally

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    Trying to Setup MySQL database locally

    Hi. I installed Mia and MySQL database, but when I needed to know the parameters for the database form.....

    Database Type: MivaSQL MySQL (Native)
    Connection String:
    Username:
    Password:
    Connection Flags:

    I dont know what to put in those fields. I believe I have everything set up properly, but I'm not 100% sure. In MySQL, I created a database named mivamerchant and selected to USE that database.
    Does someone know what else I should be doing here to get it running on my local machine...
    Thanks a lot.
    Daniel

    #2
    The connection string would be [email protected]

    So try mivamerchant@localhost

    Username and password would be whatever username and password you created the database to have rights to read/write/modify etc.

    Comment


      #3
      I don't know if it's assumed by default, but I was including the port number, so it reads databasename@localhost:3306

      I actually also have a follow-up question. I wrote a module for my store that accesses the database. I have an MvOPEN coded into the database. It occurs to me that if I ever change the username and password or the name of the database or anything, I'll need to change the code in the module.

      When people write modules for distribution, how do they access the database without knowing that info ahead of time? Do you even need the MvOpen tag, or is the connection opened at the begining of the page by default?
      Daniel Lynn


      HostMySite Hosting Plans:
      http://www.hostmysite.com/order.cfm?id=517

      Comment


        #4
        I tried all the above and nothing is working.
        I created the mivamerchant mysql database in the administration of mysql and the I select to USE that file. Do I have to have done anything else to prep the database? and it defaults by putting the folder for the database under the MySQL folder on my hard drive. The local machine that is running the Mia is set to 127.0.0.1:8000. I think I must be missing something or have left something out. Since I dont know mysql at all, I would appreciate any other ideas that I might have over looked. Thanks Daniel

        Comment


          #5
          Originally posted by DanLynn
          I don't know if it's assumed by default, but I was including the port number, so it reads databasename@localhost:3306
          3306 is assumed.

          Make sure you have a file named 'merchdb.dat' in the date root directory that looks something like the following:
          mysql|mivamerchant@localhost|username|password|

          You might also want to change 'localhost' to your machine name. You also need to make sure that the user 'username' has the right priveleges to access the 'mivamerchant' database.

          Originally posted by DanLynn
          I actually also have a follow-up question. I wrote a module for my store that accesses the database. I have an MvOPEN coded into the database. It occurs to me that if I ever change the username and password or the name of the database or anything, I'll need to change the code in the module.

          When people write modules for distribution, how do they access the database without knowing that info ahead of time? Do you even need the MvOpen tag, or is the connection opened at the begining of the page by default?
          By the time a module is called, the database is opened, so you shouldn't need that.
          Bill Guindon
          [email protected]

          Comment


            #6
            First thing is knowing the MySQL connector is even working. I struggled through this a few days back -- learning that Mia appears to install "MySQL ready" but in fact is not. And also, installing the MySQL connector you download from Miva's site will not get it working either unless you update the library path in Miva Mia to point the new mvdmysql.dll location.

            Here is a thread I started on this that details how I resolved it.

            http://extranet.miva.com/forums/showthread.php?t=2326

            Sean
            Sean Harrell
            Southland Trade Corp.

            Comment


              #7
              Sean, thanks for the help. I downloaded the dll and pointed it to the database, but now it's telling me cant access database using username and pasword...blah blah..
              So is there something I need to do to set priviledges in the mysql database? to use the user and pw I set in miva?

              Comment


                #8
                Did you get this to work? I've been trying as well, with no luck. The mysql connector info was a big help. I'm close - I can feel it ...
                Please let me know.
                Thanks.
                Helena
                Helena Martin

                Give Kids The World
                Website Coordinator

                www.gktw.org
                store.gktw.org

                Comment


                  #9
                  Yes, I got it to work. What problems are you having right now?

                  Comment


                    #10
                    Well, I think it still has to do with the mysql part. I'm not familiar with it at all. I think I'm supposed create a database - but I don't know how to do that. And I think that's my problem.
                    I have a file already there - merchdb.dat
                    But I think I have to do something in mysql. I don't know if I'm supposed to create a user, and then a database??
                    When I start Miva Mia and click on homepage, and then add merchant2/admin.mvc I get an error message
                    MIVA Merchant has encountered a fatal error and is unable to continue. The following information may assist you in determining the cause of the error:

                    Error Code: MER-ADM-00003 Description: MIVA Merchant has not been initialized. Please use the MIVA Merchant Setup script to initialize the required data files. Other Information:



                    and when I try to go to merchant2/merchant.mvc I get an error -


                    Fatal Error
                    MIVA Merchant has encountered a fatal error and is unable to continue. The following information may assist you in determining the cause of the error:

                    Error Code: MER-DBA-MYS-00001 Description: Unable to connect to database: Access denied for user 'ip792196'@'localhost' (using password: YES) Other Information:

                    UGH! This is so frustrating. Everything was spelled out so nicely and then nothing.
                    Helena
                    Helena Martin

                    Give Kids The World
                    Website Coordinator

                    www.gktw.org
                    store.gktw.org

                    Comment


                      #11
                      I had the same problem. You have to make sure you have your whole site downloaded. the httpdocs and the mivadata. Then make sure you have the mia running with the right paths to the data.
                      Are you running mysql or mivasql? It makes a difference, especially in the way you set mia. I was trying to convert mine to mysql, but couldnt do it.
                      I also changed my port to 8000.

                      Database Type: MivaSQL MySQL (Native) - This is where you have to set it to the database type your using.
                      Connection String:
                      Username:
                      Password:
                      Connection Flags:

                      I think you can contact your hosting company for the parameters for the initial settings for the above.

                      Comment


                        #12
                        Re: Trying to Setup MySQL database locally

                        Any updates to this? I am having the same problem on a fresh install!! --Justin

                        Comment


                          #13
                          Re: Trying to Setup MySQL database locally

                          Reply to Helena:

                          I had the same problem. You need to run the setup script as the error says. To do this, simply change the path name in your browser from merchant.mvc to setup.mvc. Mine looked like this.

                          http://localhost:8000/mm5/setup.mvc

                          You would use merchant2 instead of mm5 and localhost:8000 would be your host:port. To get this to run you may have to delete/rename the merchant folder in your DATA folder. I change mine to Merchant5.old and the setup script started.

                          My problem:
                          I'm trying to connect to MYSQL. I did not receive MVDMYSQL.dll anywhere in the install and need to know where to download it from. Miva's site says to get it from the ftp site, but I'm been on hold for 30 minutes waiting to talk with someone to give me the credentials to download the .dll that I need.

                          Comment


                            #14
                            Re: Trying to Setup MySQL database locally

                            Originally posted by yyg View Post
                            Reply to Helena:
                            My problem:
                            I'm trying to connect to MYSQL. I did not receive MVDMYSQL.dll anywhere in the install and need to know where to download it from. Miva's site says to get it from the ftp site, but I'm been on hold for 30 minutes waiting to talk with someone to give me the credentials to download the .dll that I need.
                            There is (was last time I did it) a problem with the connector installer in that if you install under Miva Mia (as opposed to Empresa on Windows), the dll gets stuck in the wrong place. "Wrong" as in not where Mia expects it.

                            It gets placed here:

                            C:\Program Files\Miva\MySQL interface for Miva Empresa\DATABASES

                            Mia thinks it should be here:

                            C:\MIVAMia\DATABASES\

                            So either move it. Or fix the Miva Mia config by editing the library path.

                            HTH
                            Sean Harrell
                            Southland Trade Corp.

                            Comment


                              #15
                              Re: Trying to Setup MySQL database locally

                              Originally posted by Southlander View Post
                              There is (was last time I did it) a problem with the connector installer in that if you install under Miva Mia (as opposed to Empresa on Windows), the dll gets stuck in the wrong place. "Wrong" as in not where Mia expects it.

                              It gets placed here:

                              C:\Program Files\Miva\MySQL interface for Miva Empresa\DATABASES

                              Mia thinks it should be here:

                              C:\MIVAMia\DATABASES\

                              So either move it. Or fix the Miva Mia config by editing the library path.

                              HTH

                              Thanks for replying so quickly. I'd already looked in various places for the .dll, but it was nowhere to be found. Thanks for the help though. You really put me on the right track.

                              I was able to get ahold of support. They gave me this thread:

                              http://extranet.mivamerchant.com/for...&highlight=mia

                              In that thread there is a link to the MIA MySQL Connector:

                              https://support.smallbusiness.miva.c...mid=33&nav=0,3

                              That's what I needed.

                              Thanks,
                              Yyg

                              *Note: In Miva MIA libraries, you must choose MVDMYSQLx.dll where x is 4 or 5 depending on your MySQL version. You need to update the MySQL method to point to the correct dll. You CANNOT, however, rename it to MySQL5 (or 4) because MIA looks for the "MySQL" when trying to connect.

                              Comment

                              Working...
                              X