Wayback Machinekoobas.hobune.stream
May JUN Jul
Previous capture 13 Next capture
2021 2022 2023
1 capture
13 Jun 22 - 13 Jun 22
sparklines
Close Help
  • Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
  • Asset Store
  • Get Unity

UNITY ACCOUNT

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account
  • Blog
  • Forums
  • Answers
  • Evangelists
  • User Groups
  • Beta Program
  • Advisory Panel

Navigation

  • Home
  • Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
    • Blog
    • Forums
    • Answers
    • Evangelists
    • User Groups
    • Beta Program
    • Advisory Panel

Unity account

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account

Language

  • Chinese
  • Spanish
  • Japanese
  • Korean
  • Portuguese
  • Ask a question
  • Spaces
    • Default
    • Help Room
    • META
    • Moderators
    • Topics
    • Questions
    • Users
    • Badges
  • Home /
avatar image
0
Question by oszeel · Aug 22, 2013 at 01:05 PM · androidiosmysql

MySQL and Unity android build

Hi guys,

My company making an app for android and iOS and I need to make connection to mySQL for now and I read a lot of posts and I import MySQL.Data.dll and System.Data to Assets folder and make a script but I can't build it for android.

I get

Error building Player: SystemException: 'System.Net.Sockets' are supported only with Unity Android Pro. Referenced from assembly 'Mono.Data.Tds'.

Is there any chance to get working build for android and iOS with mySQL dll?

Comment
Add comment · Show 4
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image tw1st3d · Aug 22, 2013 at 01:08 PM 1
Share

"Unity Android Pro" you probably don't have the proper licensing.

avatar image oszeel · Aug 22, 2013 at 01:29 PM 0
Share

Yes, but is there any other way to make it works?

avatar image DevMerlin · Aug 22, 2013 at 01:32 PM 0
Share

I believe you could make a PHP data connection first, then transfer variables via POST, JSON or other methods and save them in mySQL.

avatar image oszeel · Aug 22, 2013 at 01:34 PM 0
Share

Yes I know, but mySQL is just for now to test, because in 2 months we'll change mySQL to mongo

2 Replies

· Add your reply
  • Sort: 
avatar image
1

Answer by h8crew · Aug 22, 2013 at 02:06 PM

Make a WWW request to a PHP script (passing it variables via the URL) hosted on a remote server where the database exists. Make the PHP script return a string and parse it in Unity.

Comment
Add comment · Show 3 · Share
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image oszeel · Aug 22, 2013 at 10:33 PM 0
Share

I will try it later, now I just wanna connect to database but I got this error

ArgumentException: Format of initialization string does not conform to specifications at index 90.

$$anonymous$$y connection string:

 server = "localhost";
 database = "test_1";
 uid = "test_1";
 password = "dfe#4fd._@";
 string connectionString;

  connectionString = "SERVER=" + server + ";" + "DATABASE=" + 
                 database + ";" + "UID=" + uid + ";" + "PASSWORD=" + password +  ";";
avatar image Bunny83 · Aug 22, 2013 at 11:24 PM 0
Share

Your connection string is only 65 characters long, so if there's an error at index 90 the only two reasons are:

  • This is not the connection string you use when you open the connection

  • You alter the string before you pass it to the DB.

Btw: There are 1001 ways to connect to a $$anonymous$$ySQL database, what exact DLL / driver are you using? Where have you found it?

avatar image oszeel · Aug 22, 2013 at 11:32 PM 0
Share

Im using $$anonymous$$ySqlData.dll Im download it yesterday from official page.

avatar image
-1

Answer by elgameshdpay · Oct 16, 2017 at 08:17 PM

any solution?

Comment
Add comment · Show 1 · Share
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image Bunny83 · Oct 17, 2017 at 12:23 AM 0
Share

I would downvote multiple times if it was possible:

  • You just woke up a four years old question which is completely obsolete now as Unity doesn't have this restriction anymore since at least Unity 5.6 i think.

  • You most likely don't have the exact same problem as the OP. So if you have a similar question, ask a seperate question and do not try to hijack other peoples questions.

  • You posted an answer without answering the question.

  • Bumping threads without adding anything new is a bad habit.

  • There is already an answer that presented a solution (to use WWW and a PHP interface on your server). However as the Socket restriction doesn't apply anymore you should be able to juse use the normal $$anonymous$$ySQL connector. Though it's never recommended to directly connect to a $$anonymous$$ySQL server. In almost all cases you want to communicate through a PHP or similar interface.

Your answer

Hint: You can notify a user about this post by typing @username

Up to 2 attachments (including images) can be used with a maximum of 524.3 kB each and 1.0 MB total.

Follow this Question

Answers Answers and Comments

20 People are following this question.

avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image

Related Questions

How much it cost Union to Port to iOS? 1 Answer

C++ windows DLL and Android? 1 Answer

Develop for iOS/Android using Windows PC 3 Answers

Things to do to port game made for iOS in Unity to Android? 2 Answers

Make an object move in the direction of touch 0 Answers


Enterprise
Social Q&A

Social
Subscribe on YouTube social-youtube Follow on LinkedIn social-linkedin Follow on Twitter social-twitter Follow on Facebook social-facebook Follow on Instagram social-instagram

Footer

  • Purchase
    • Products
    • Subscription
    • Asset Store
    • Unity Gear
    • Resellers
  • Education
    • Students
    • Educators
    • Certification
    • Learn
    • Center of Excellence
  • Download
    • Unity
    • Beta Program
  • Unity Labs
    • Labs
    • Publications
  • Resources
    • Learn platform
    • Community
    • Documentation
    • Unity QA
    • FAQ
    • Services Status
    • Connect
  • About Unity
    • About Us
    • Blog
    • Events
    • Careers
    • Contact
    • Press
    • Partners
    • Affiliates
    • Security
Copyright © 2020 Unity Technologies
  • Legal
  • Privacy Policy
  • Cookies
  • Do Not Sell My Personal Information
  • Cookies Settings
"Unity", Unity logos, and other Unity trademarks are trademarks or registered trademarks of Unity Technologies or its affiliates in the U.S. and elsewhere (more info here). Other names or brands are trademarks of their respective owners.
  • Anonymous
  • Sign in
  • Create
  • Ask a question
  • Spaces
  • Default
  • Help Room
  • META
  • Moderators
  • Explore
  • Topics
  • Questions
  • Users
  • Badges