Table of Contents
Github地址:https://github.com/enbandari/aMysqlClient
引子
1、搜
2、想
3、做
3.1 android不能直接用Spring核心
3.2 保持命令上下文
3.3 jdbc url必须指定数据库名称
4、 看
4.1 简易模式
4.2、命令行模式
4.2.1 显示历史记录
4.2.2 长按"mysql>'即可呼出常用命令
4.2.3 还有关键字输入快捷区
4.2.4 输入命令时的关键字提示
5、后记
Home Database Mysql Tutorial Mysql客户端Android版的开源产品_MySQL

Mysql客户端Android版的开源产品_MySQL

Jun 01, 2016 pm 01:03 PM
product client

Github地址:https://github.com/enbandari/aMysqlClient

引子

本着爱扯淡的一贯作风,先讲一下为什么要做个这。。

话说,从某狗实习回来之后,守着实验室的大offer实在不是咱的作风,所以就跟小伙伴们开始搞一款应用。这款应用的服务器和数据库这一摊子事儿自然习惯性的被交代给了洒家。闲话不表。却说某一夜洒家正酣睡,约摸二更时分,被客户端开发妹子一通电话唤醒,道明原委,原来Mysql数据可能出现异常,需要洒家查明真相。洒家自是百般不情愿,但还是连滚带爬,翻身下地,戳开小本,一探究竟。。

洒家自忖,若是手机可以了解此事,何须如此周折。。。

1、搜

何必重复造轮子?于是谷歌一番,不料竟无一app可令android手机操作Mysql。神伤啊。。

2、想

这可如何是好?

思忖良久,如何模拟cmd搞一个mysql命令行?开socket连3306?自行解析协议?吾非蓝翔出身,恐难以胜任呀。也是天命所归,此时洒家正翻腾服务器代码,一眼瞄上了Spring jdbc。若使jdbc连接mysql,便可省去一番协议之事,真乃得来全不费工夫也。

3、做

3.1 android不能直接用Spring核心

洒家既然决定用Spring jdbc搞定此时,定然琢磨android端如何用得起服务器框架。实验几番,不想Spring核心因为Java库文件与android冲突而不能使用。烦恼烦恼。既然如此,也省的费事,想想Spring jdbc不过也是jdbc的一层封装,只用Spring jdbc应该无妨吧?试之,果然。

3.2 保持命令上下文

洒家也是醉了。直接利用Spring jdbc企图做一命令行。也不是不可,最初未使用连接池,使得每次发送的命令都使用不同的连接。因而你想use test(test乃一库也!),然后select * from t(t乃test库中表也!),对方答曰:哦抱歉,没有t这表。

这。。

上个DBCP如何?果然问题得以解决,原因嘛,就是连接没有释放罢了。

3.3 jdbc url必须指定数据库名称

洒家真的不开心了……洒家如何知道您那数据库服务器有撒子库嘛。想来想去,只好默认为jdbc url配置库名为information_schema了,客官如有特殊需求,还请自便呐!

4、 看

洒家知道,无图无真相。页面没有那么有美感。别挑哈。

4.1 简易模式

服务列表,客官可以在此编辑自己的服务器信息。洒家把这些信息存到了客官手机的sqlite当中了,洒家才不想要你的密码呢。

\\

客官,如果您只是来围观的,劝您就选简易模式吧。

\\

数据那一页可是能够拖动的哈!上下左右,毫无压力!

\\

4.2、命令行模式

命令行模式就是客官熟悉的模式了!在此,为了方便客官输入命令,洒家提供了以下便捷的方式!

4.2.1 显示历史记录

按'mysql' 即可呼出历史记录列表~~

\

4.2.2 长按"mysql>'即可呼出常用命令

\

4.2.3 还有关键字输入快捷区

\

4.2.4 输入命令时的关键字提示

5、后记

其实程序的主体功能是洒家在回家的那次火车上搞出来的,火车上真无聊。。

千万不要开启混淆,因为混淆会导致连接失败。为啥?洒家最近面试太多,累,不想管。。

Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn

Hot AI Tools

Undresser.AI Undress

Undresser.AI Undress

AI-powered app for creating realistic nude photos

AI Clothes Remover

AI Clothes Remover

Online AI tool for removing clothes from photos.

Undress AI Tool

Undress AI Tool

Undress images for free

Clothoff.io

Clothoff.io

AI clothes remover

AI Hentai Generator

AI Hentai Generator

Generate AI Hentai for free.

Hot Article

R.E.P.O. Energy Crystals Explained and What They Do (Yellow Crystal)
2 weeks ago By 尊渡假赌尊渡假赌尊渡假赌
R.E.P.O. Best Graphic Settings
2 weeks ago By 尊渡假赌尊渡假赌尊渡假赌

Hot Tools

Notepad++7.3.1

Notepad++7.3.1

Easy-to-use and free code editor

SublimeText3 Chinese version

SublimeText3 Chinese version

Chinese version, very easy to use

Zend Studio 13.0.1

Zend Studio 13.0.1

Powerful PHP integrated development environment

Dreamweaver CS6

Dreamweaver CS6

Visual web development tools

SublimeText3 Mac version

SublimeText3 Mac version

God-level code editing software (SublimeText3)

VMware Horizon Client cannot be opened [Fix] VMware Horizon Client cannot be opened [Fix] Feb 19, 2024 pm 11:21 PM

VMware Horizon Client helps you access virtual desktops conveniently. However, sometimes the virtual desktop infrastructure may experience startup issues. This article discusses the solutions you can take when the VMware Horizon client fails to start successfully. Why won't my VMware Horizon client open? When configuring VDI, if the VMWareHorizon client is not open, an error may occur. Please confirm that your IT administrator has provided the correct URL and credentials. If everything is fine, follow the solutions mentioned in this guide to resolve the issue. Fix VMWareHorizon Client Not Opening If VMW is not opening on your Windows computer

VMware Horizon client freezes or stalls while connecting [Fix] VMware Horizon client freezes or stalls while connecting [Fix] Mar 03, 2024 am 09:37 AM

When connecting to a VDI using the VMWareHorizon client, we may encounter situations where the application freezes during authentication or the connection blocks. This article will explore this issue and provide ways to resolve this situation. When the VMWareHorizon client experiences freezing or connection issues, there are a few things you can do to resolve the issue. Fix VMWareHorizon client freezes or gets stuck while connecting If VMWareHorizon client freezes or fails to connect on Windows 11/10, do the below mentioned solutions: Check network connection Restart Horizon client Check Horizon server status Clear client cache Fix Ho

What do product parameters mean? What do product parameters mean? Jul 05, 2023 am 11:13 AM

Product parameters refer to the meaning of product attributes. For example, clothing parameters include brand, material, model, size, style, fabric, applicable group, color, etc.; food parameters include brand, weight, material, health license number, applicable group, color, etc.; home appliance parameters include brand, size, color , place of origin, applicable voltage, signal, interface and power, etc.

How to set up camera mirroring on Xiaomi Mi 14 Ultra? How to set up camera mirroring on Xiaomi Mi 14 Ultra? Mar 18, 2024 am 11:10 AM

After the release of Xiaomi 14Ultra, many friends who like to take pictures have chosen to place orders. Xiaomi 14Ultra provides more choices, such as the photo mirror function, and you can choose to turn on the "photo mirror rotation" function. In this way, when you take photos, you can take selfies in the way you are used to. But how should Xiaomi 14Ultra set up the camera mirror? How to set up camera mirroring on Xiaomi Mi 14Ultra? 1. Open the camera of Xiaomi 14Ultra. 2. Find "Settings" on the screen. 3. On this page, you will see an option labeled "Capture Settings." 4. Click this option, and then find the "Photo Mirror" option in the drop-down menu. 5. Just open it. Xiaomi 14U

PHP MQTT Client Development Guide PHP MQTT Client Development Guide Mar 27, 2024 am 09:21 AM

MQTT (MessageQueuingTelemetryTransport) is a lightweight message transmission protocol commonly used for communication between IoT devices. PHP is a commonly used server-side programming language that can be used to develop MQTT clients. This article will introduce how to use PHP to develop an MQTT client and include the following content: Basic concepts of the MQTT protocol Selection and usage examples of the PHPMQTT client library: Using the PHPMQTT client to publish and

How to solve the problem that the Baidu Netdisk webpage cannot start the client? How to solve the problem that the Baidu Netdisk webpage cannot start the client? Mar 13, 2024 pm 05:00 PM

When many friends download files, they will first browse on the web page and then transfer to the client to download. But sometimes users will encounter the problem that the Baidu Netdisk webpage cannot start the client. In response to this problem, the editor has prepared a solution for you to solve the problem that the Baidu Netdisk webpage cannot start the client. Friends in need can refer to it. Solution: 1. Maybe Baidu Netdisk is not the latest version. Manually open the Baidu Netdisk client, click the settings button in the upper right corner, and then click version upgrade. If there is no update, the following prompt will appear. If there is an update, please follow the prompts to update. 2. The detection service program of Baidu Cloud Disk may be disabled. It is possible that we manually or use security software to automatically disable the detection service program of Baidu Cloud Disk. Please check it out

What is the mobile client What is the mobile client Aug 16, 2023 pm 01:40 PM

A mobile client refers to an application that runs on a smartphone and provides users with various functions and services in the form of a native client or a web client. Mobile clients can be divided into two forms: original clients and web clients. Native clients refer to applications written for specific operating systems using specific programming languages ​​and development tools. The advantage of web clients is that they have good cross-platform compatibility. , can run on different devices without operating system restrictions, but compared to the native client, the performance and user experience of the web client may be reduced.

How to write an FTP client in PHP How to write an FTP client in PHP Aug 01, 2023 pm 07:23 PM

How to write an FTP client in PHP 1. Introduction FTP (File Transfer Protocol) is a protocol used for file transfer on the network. In web development, we often need to upload or download files through FTP. As a popular server-side language, PHP provides powerful FTP functions, allowing us to easily write FTP clients. This article will introduce how to write a simple FTP client using PHP and provide code examples. 2. Connect to the FTP server in PHP, we can use f

See all articles