Comments (3)
Thanks for reporting! I will investigate and provide feedback.
from fake2db.
First error is that there is no password attribute set in mysql_handler.py. So we have a root password defined and it can't connect. Second point is that there are typos after line 87 in mysql_handler.py. And I would add 'IF NOT EXISTS'. And in line 225 is a wrong insert.
fake2db.py
70a71
> parser.add_argument("--passwd", help="OPTIONAL : Pass of root user. ")
104c105
< fake_mysql_handler.fake2db_mysql_initiator(host, port, int(args.rows), str(args.name))
---
> fake_mysql_handler.fake2db_mysql_initiator(str(args.passwd), host, port, int(args.rows), str(args.name))
106c107
< fake_mysql_handler.fake2db_mysql_initiator(host, port, int(args.rows))
---
> fake_mysql_handler.fake2db_mysql_initiator(str(args.passwd), host, port, int(args.rows))
mysql_handler.py
26c26
< def fake2db_mysql_initiator(self, host, port, number_of_rows, name=None):
---
> def fake2db_mysql_initiator(self, passwd, host, port, number_of_rows, name=None):
29a30,31
>
> print "PASS: %s" % passwd
32c34
< cursor, conn = self.database_caller_creator(host, port, name)
---
> cursor, conn = self.database_caller_creator(passwd, host, port, name)
34c36
< cursor, conn = self.database_caller_creator(host, port)
---
> cursor, conn = self.database_caller_creator(passwd, host, port)
57c59
< def database_caller_creator(self, host, port, name=None):
---
> def database_caller_creator(self, passwd, host, port, name=None):
71c73
< conn = mysql.connector.connect(user='root', host=host, port=port)
---
> conn = mysql.connector.connect(user='root', password=passwd , host=host, port=port)
88c90
< "CREATE TABLE `simple_registration` ("
---
> "CREATE TABLE IF NOT EXISTS `simple_registration` ("
96c98
< "CREATE TABLE `simple_registration` ("
---
> "CREATE TABLE IF NOT EXISTS `detailed_registration` ("
108c110
< "CREATE TABLE `user_agent` ("
---
> "CREATE TABLE IF NOT EXISTS `user_agent` ("
117c119
< "CREATE TABLE `user_agent` ("
---
> "CREATE TABLE IF NOT EXISTS `company` ("
128c130
< "CREATE TABLE `simple_registration` ("
---
> "CREATE TABLE IF NOT EXISTS `customer` ("
225c227
< customer_payload = ("INSERT INTO detailed_registration "
---
> customer_payload = ("INSERT INTO customer "
from fake2db.
Seems there's no password for postgres handler?
from fake2db.
Related Issues (20)
- Allow faster data loading. HOT 5
- Install shouldn't fail if I don't have pg_config HOT 3
- Python socket package throws error in fake2db_logger under helpers.py HOT 3
- Adding more nosql db HOT 1
- Error when running cli HOT 5
- Missing faker_options_container HOT 4
- Not sure how to start with. HOT 2
- name not taken in consideration for mysql HOT 3
- mongodb hanging on 1 million rows HOT 5
- Misprint in column name 'address' in sqlite_handler.data_filler_detailed_registration HOT 1
- Populate an existing database + schema? HOT 1
- How to get auto-increment ID and specify custom column names? HOT 1
- custom table name and number
- Missing tags HOT 1
- database already exists HOT 1
- Allow multiple columns with same faker key OR allow column naming
- --database option
- MySql connector is always required
- Companies Data Not Working? HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from fake2db.