In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-19 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >
Share
Shulou(Shulou.com)06/03 Report--
This article mainly explains "the steps of configuring Mysql DBI in Ruby". Interested friends may wish to have a look. The method introduced in this paper is simple, fast and practical. Let's let the editor take you to learn the steps of configuring Mysql DBI with Ruby.
Ruby configuration Mysql DBI1, preparation work.
First download the DBI interface: http://rubyforge.org/frs/download.php/12368/dbi-0.1.1.tar.gz
The same can be used under Windows. Decompress it and put it in the ruby directory, such as C:\ ruby\ ruby-dbi.
Ruby configure Mysql DBI2, install the mysql dbi interface, and run the following command under C:\ ruby\ ruby-dbi:
Ruby setup.rb config-- with=dbi,dbd_mysql / / if this command does not work, use ruby setup.rb config-- with dbi,dbd_mysql to run
Ruby setup.rb setup
Ruby setup.rb install
Ruby configures Mysql DBI3 and installs the lib required by mysql:
Gem installmysql
After entering 2 at the prompt, you can see that the installation is successful.
Ruby configure Mysql DBI4 and copy dll files to the ruby directory:
Find libmySQL.dll,Copy in the mysql database directory to the c:\ ruby\ bin directory.
Ruby configures Mysql DBI5. The installation is complete and can be used.
The test code is as follows:
Require "dbi"
Thedbi=DBI.connect ("dbi:Mysql:test:localhost", "root", "")
If the execution is successful, mysql dbi is installed successfully.
At this point, I believe that you have a deeper understanding of the "Ruby configuration Mysql DBI steps", might as well come to the actual operation of it! Here is the website, more related content can enter the relevant channels to inquire, follow us, continue to learn!
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.